Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- if exist "1" goto start
- if not exist "1" goto end
- :start
- if not exist %cd%\2 (ren "1" "2" & goto end)
- if exist %cd%\2 (set /a folder=3 & goto rename)
- :rename
- if not exist %cd%\%folder% (ren "1" %folder% & goto end)
- if exist %cd%\%folder% goto rename2
- :rename2
- set /a folder=%folder%+1
- goto rename
- :end
- mkdir "1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement