Technology, life, programming, travel and money.

Posts Tagged ‘batch file’

DOS: Get the directory name from a file path

DOS: Get the directory name from a file path

If you need to write a DOS batch file that takes a file path as an input parameter and needs to do something to other files in the same directory as the input file then you’ll find there is no easy way to get the file’s directory name into a variable. You could pass in the directory name as a separate parameter but that seems like [...]

Converting file extensions to lower case

Recently I needed to convert a large number of photo file extensions to lower case. Doing this manually would take ages and wouldn’t be a fun job. I wrote a quick batch file to look through all the sub-directories from the one it is executed from and change selected file extensions to lower case. To use this script place the below code in [...]

Starting a group of programs from a DOS batch file

I use my computer for a variety of purposes - for example writing web content, programming, or word processing. For each of these activities I need a different set of programs to be loaded. To take one example when I'm writing or modifying web pages I need: NoteTab Pro which I use to edit the HTML files' WS_FTP Pro for uploading the [...]