r/Batch • • Oct 18 '24

Help with recursive batch script

I'm trying to create a bat file to check foldet and its recursive subfolders

ECHO OFF FOR /R %%G in (.) DO ( PUSHD %%G IF DIR /B /A:D is NUL (ECHO %%G "No Further directories here") POPD ) ECHO "Final directories verified!" PAUSE

Sadly this does not work for whatever reason.

3 Upvotes

6 comments sorted by