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