AAaron123 wrote:
> for /f "delims=" %%a in ('dir /B *.sql') do call :subr "%%a"
My guess is you are ensuring that the default parsing characters of
space and tab are used. You aren't specifying delimiters for the items
added the output list specifying by the filespec for the 'in' operator.
Doesn't seem any point in specifying a null string because the result is
to use the default delimiters.
> Also, can "do" executed two commands?
Separate the commands with & or &&.
& = do next command even if prior command errors.
&& = do next command only if prior command does not error.
Example (using your for-loop):
for /f %%a in ('dir /B *.sql') do echo Processing %%a & call :subr "%%a"
In this case, it doesn't make a difference in using & or &&. But in:
for /f %%a in ('dir /B *.sql') do ren "%%a" "%%a.tmp" && call :subr "%%a"
it will only do the call if the rename worked. There are other
conditional operators for multiple commands. Read:
http://www.microsoft.com/resources/d....mspx?mfr=true