Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. @echo off
  2. setlocal enableextensions enabledelayedexpansion
  3. set counter=0
  4. for /d %%d in (*) do (
  5. set /a counter+=1
  6. call :lz
  7. pushd %%d
  8. for %%f in (*) do ren "%%f" "!counter!-%%f"
  9. popd
  10. ren "%%d" "!counter!-%%d"
  11. )
  12. endlocal
  13. goto :eof
  14. :lz
  15. set counter=000%counter%
  16. rem adapt this to allow for three-digit numbering
  17. set counter=%counter:~-2%
  18. goto :eof
  19.  
  20. @echo off
  21. setlocal enableextensions enabledelayedexpansion
  22. set counter=0
  23. for /d %%d in (*) do (
  24. set /a counter+=1
  25. call :lz
  26. pushd %%d
  27. for %%f in (*) do ren "%%f" "!counter!-%%f"
  28. popd
  29. ren "%%d" "!counter!-%%d"
  30. )
  31. endlocal
  32. goto :eof
  33. :lz
  34. set counter=000%counter%
  35. rem adapt this to allow for three-digit numbering
  36. set counter=%counter:~-2%
  37. goto :eof
  38.  
  39. @echo off
  40. setlocal enableextensions enabledelayedexpansion
  41. set counter=0
  42. for /d %%d in (*) do (
  43. set /a counter+=1
  44. call :lz
  45. pushd %%d
  46. for %%f in (*) do ren "%%f" "!counter!-%%f"
  47. popd
  48. ren "%%d" "!counter!-%%d"
  49. )
  50. endlocal
  51. goto :eof
  52. :lz
  53. set counter=000%counter%
  54. rem adapt this to allow for three-digit numbering
  55. set counter=%counter:~-2%
  56. goto :eof
  57.  
  58. for /d %%d in (*)
  59.  
  60. set counter=%counter:~-2%
  61.  
  62. for %%f in (*) do ren "%%f" "!counter!-%%f"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement