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.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories