Tuesday, May 31, 2011

How can I run multiple exe files without listing each one with a batch file?

I have 60+ exe files (in one directory) that change weekly and I would like to run them all with a wildcard statement or something instead of running each one individually. I currently have a batch that names each file but now the ';powers that be'; decided to update and change the files on a weekly basis. I need to RUN *.EXE or something like that.How can I run multiple exe files without listing each one with a batch file?
You can do this from the command line:



for %a in (*.exe) do %aHow can I run multiple exe files without listing each one with a batch file?
I would write a script that pipes a directory listing to a text file, then call that file. Name it a .bat file.



I assume you are running this under DOS.



I think it would go something like this:



dir *.exe /b %26gt; runall.bat

call runall.bat



I think that will do what you want.

Lemme know if it works.

No comments:

Post a Comment