Solved Run a batch recursively

January 15, 2015 at 14:58:49
Specs: Windows 7

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

| x.bat
| x.bat
. 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"

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

Thank you very much.

See More: Run a batch recursively

Report •

January 16, 2015 at 18:51:02
✔ Best Answer
I think you just need to ditch the /D, since that kind of confuses the issue with /R. They're similar, and I often get them mixed up, but I doubt if using both in the same command will work the way you intend. You might want to post "x.bat" content if further assistance is needed, so we can see what it's trying to do.

Report •
Related Solutions

Ask Question