Friday, March 5, 2010

BAT file ro tun a program for every file in a directory

If you want to run a program(for example an image resizer) for every file in a directory, then you can make a .bat file with the following line:

for %%f in (*) do resizer.exe %%f

(this works if the program(in this case a resizer) will accept the filename as a paramenter