Page 1 of 1

Run second command after 1st ends

Posted: 03 Oct 2014 08:03
by val5662
Hi All.... :D
I want to run the second command starting with the "md mapsonly" only after the line above has completed it's job.
The time it takes to complete the 1st task will vary from 5 seconds to 5 minutes.
How can I accomplish this without calling a 2nd external batch file?
Thanks!
Val

@echo off
md vehicsonly
for /f "eol=: delims=" %%F in ('findstr /m /I vehicles *.idf') do @move "%%F" vehicsonly >nul
md mapsonly
for /f "eol=: delims=" %%F in ('findstr /m /I maps *.idf') do @move "%%F" mapsonly >nul

Re: Run second command after 1st ends

Posted: 03 Oct 2014 08:05
by foxidrive
Those commands all run sequentially as it is.

Can you explain further?

Re: Run second command after 1st ends

Posted: 03 Oct 2014 12:36
by val5662
Foxidrive....
Sorry,I didn't know that.
What I thought was that the way I had it coded it would run simultaneously.
Thanks for letting me know.
I appreciate it!
Val :D

Re: Run second command after 1st ends

Posted: 03 Oct 2014 21:18
by Squashman
val5662 wrote:What I thought was that the way I had it coded it would run simultaneously.
What made you think that? What if your next command relied on the output of the previous command?
What do you think would happen if it was a FOR /L command that looped for a couple million iterations?