Howdy, Stranger!

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

Categories

Run a batch recursively

juegos0607juegos0607 ColombiaMember Posts: 0

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.

Tagged:
Sign In or Register to comment.