Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enableextensions enabledelayedexpansion
- set counter=0
- for /d %%d in (*) do (
- set /a counter+=1
- call :lz
- pushd %%d
- for %%f in (*) do ren "%%f" "!counter!-%%f"
- popd
- ren "%%d" "!counter!-%%d"
- )
- endlocal
- goto :eof
- :lz
- set counter=000%counter%
- rem adapt this to allow for three-digit numbering
- set counter=%counter:~-2%
- goto :eof
- @echo off
- setlocal enableextensions enabledelayedexpansion
- set counter=0
- for /d %%d in (*) do (
- set /a counter+=1
- call :lz
- pushd %%d
- for %%f in (*) do ren "%%f" "!counter!-%%f"
- popd
- ren "%%d" "!counter!-%%d"
- )
- endlocal
- goto :eof
- :lz
- set counter=000%counter%
- rem adapt this to allow for three-digit numbering
- set counter=%counter:~-2%
- goto :eof
- @echo off
- setlocal enableextensions enabledelayedexpansion
- set counter=0
- for /d %%d in (*) do (
- set /a counter+=1
- call :lz
- pushd %%d
- for %%f in (*) do ren "%%f" "!counter!-%%f"
- popd
- ren "%%d" "!counter!-%%d"
- )
- endlocal
- goto :eof
- :lz
- set counter=000%counter%
- rem adapt this to allow for three-digit numbering
- set counter=%counter:~-2%
- goto :eof
- for /d %%d in (*)
- set counter=%counter:~-2%
- for %%f in (*) do ren "%%f" "!counter!-%%f"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement