Re: tech run a batch recursively


[ Follow Ups ] [ Post Followup ] [ The Tech Forum ] [ FAQ ]

Posted by GH on January 18, 2015 at 10:54:35:

In Reply to: tech run a batch recursively posted by techuser on January 15, 2015 at 17:41:55:

: run a batch recursively

: Hello,

: I want to run x.bat automatically and recursively in:

: C:\test
: |
: +---folder1
: | x.bat
: |
: +---folder2
: | x.bat
: |
: +---folder3
: . x.bat
: .
: .----foldern
: x.bat

: Can be sequentially and simultaneously, no matter

: I have this:

: @echo off
: for /r /d %%x in ("*") do (
: pushd "%%x"
: call "x.bat"
: popd
: )
: pause

: But only runs x.bat for folder1 in a loop.

:
: Thank you very much

Don't you have to include a change of directories (CD) in your loop?



Follow Ups:



Post a Followup (use TAB key to move between boxes - NOT ENTER or RETURN)

Name:
E-Mail:

Subject:

Type your comments in the box below and SUBMIT:


[ Follow Ups ] [ Post Followup ] [ The Tech Forum ] [ FAQ ]