Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
val5662
- Posts: 34
- Joined: 18 Dec 2013 09:48
#1
Post
by val5662 » 03 Oct 2014 08:03
Hi All....
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
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#2
Post
by foxidrive » 03 Oct 2014 08:05
Those commands all run sequentially as it is.
Can you explain further?
-
val5662
- Posts: 34
- Joined: 18 Dec 2013 09:48
#3
Post
by val5662 » 03 Oct 2014 12:36
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

-
Squashman
- Expert
- Posts: 4488
- Joined: 23 Dec 2011 13:59
#4
Post
by Squashman » 03 Oct 2014 21:18
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?