Jerry's answer might very well be what is causing the problem. You might solve it by changing. for %%s in (*.sql) do call. to. for %%s in (dir"*.sql ...
set OUTPUT=%OUTPUT%%T%_%S%.bat
You are almost done, you only need to replace the for loop by a for /F , that parses the output of dir /B A:-D /O:-D , which constitutes a list of files ...
If you are using the FOR command at the command line rather than in a batch program, use just one percent sign: %G instead of %%G.
These are automatically assigned in alphabetical order %%H %%I %%J ..
3 Answers. 3. order by. active, oldest, votes. Up vote 50 ...
Possible to Sort/Order files in a FOR Loop? batch-file cmd. I've done some digging and can't seem to find a simple answer anywhere, maybe ...
is a list of any elements, separated by either spaces, comma's or semicolons. command, can be any internal or external command, batch file or ...
I think I'd probably use sed or awk or something under Linux, but I'm on Windows 7 here using the command prompt (and soon, a batch file).
At most one of each, in any order. commands. One or more commands to execute each time through the loop. If you use multiple commands, ...