To the Top


Last Modified: October 30 2020 14:33:16
File:  root - programs - 80x86_batch - 2008 - 5 - r.bat
File Size: 0.99KB


  1. @echo off
  2. set cc=0
  3. set dd=1
  4. set od=%1
  5. set td=%2
  6. set nn=%3
  7. set ex=jpg
  8. cls
  9. echo.
  10. echo Windows XP Batch file
  11. echo Created by Zhihua Lai, 2007-Aug-30
  12. echo The program can move all the %ex% files in %od% folder into
  13. echo %td% folder and rename it by number
  14. echo each folder (also labeled as number %dd% var) contains at most
  15. echo %nn% pictures....
  16. echo.
  17. echo Press any key to continue, press Ctrl-C to exit....
  18. pause >nul
  19. rem cls
  20. if not exist %td% mkdir %td% && echo %td% created...
  21. for /f "usebackq delims==" %%i in (`dir /s /b %od%\*.%ex%`) do (
  22. call :dothing "%%i"
  23. )
  24. goto :clear
  25. :dothing
  26. if exist "%1\nul" goto :end
  27. if not exist "%td%\%dd%" mkdir "%td%\%dd%" && echo "%td%\%dd%" created...
  28. set /a cc=cc+1 >nul
  29. move %1 "%td%\%dd%\%cc%.jpg"
  30. echo %1 has been moved to "%td%\%dd%\%cc%.jpg"!!!!
  31. if /i "%cc%" EQU "%nn%" set /a cc=0 && set /a dd=dd+1
  32. goto :end
  33. :clear
  34. set cc=
  35. set dd=
  36. set od=
  37. set td=
  38. set nn=
  39. set ex=
  40. :end

Comments (0)

    Be the first one to comment this page !


Page Edited: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />