The number of batch files traverse and calculate the sub-folder

@echo off
 FOR /D %%G in ("*") DO (
     PUSHD "%%G"
     for /D %%A in ("*") DO (
      PUSHD "%%A"
    FOR /F "delims=" %%H in ('dir /a-d /b * ^|find /C /V ""') DO echo %%G=%%H>>"..\..\count.txt"
                POPD
)    
     POPD
)
pause

* * Can be replaced with any suffix name

Guess you like

Origin www.cnblogs.com/expttt/p/12186668.html