I've seen multiple posts about issues like this, but I can't find the answer that would fit my example.
What I need
Within my script I need to start all .cmd-files that are in a spesific folder (not where my script is located). It is 53 .cmd files that does different type of jobs within this folder.
The issue
I want a short command that makes it possible to open all the files within one or a few lines insted of having 53 of these lines start "c:\allcmdfiles\example-xxx-xx shortcut.cmd"
What I'm trying
So with other posts on StackOverFlow I bumped into the call command. I've tried a variety of these commands, but can't make it work
for %%f in ("c:\allcmdfiles*.cmd")
do CALL %%f
Perhaps some practical info
Its gonna run on Windows Server 2008 R2 std, but I'm testing on W7
The files will variate with spaces in the name and dashes
My question
So does anyone know how I can nail this? Thanks!
%(%f) and .bat extension?cdin target dir.cmd.exeexits batch processing because of invalid syntax. Test batch files by executing them from within a command prompt window and not by double clicking on it from GUI to see error messages.