Advertisement
KimChoJapFan

Batch file image copier

Nov 10th, 2014
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.59 KB | None | 0 0
  1. REM The purpose of this batch file is to copy images from all subfolders into a single folder.
  2. REM This is useful if you cache entire websites on Windows platforms.
  3. REM Copy everything between @echo off and pause and paste it in notepad and save as a .bat file.
  4.  
  5. @echo off
  6. pushd %~dp0
  7. mkdir JPG
  8. mkdir JPEG
  9. mkdir PNG
  10. mkdir GIF
  11. for /r %%a in (*.jpg) do (
  12.     COPY "%%a" "%~dp0\JPG\%%~nxa"
  13. )
  14. for /r %%a in (*.jpeg) do (
  15.     COPY "%%a" "%~dp0\JPEG|%%~nxa"
  16. )
  17. for /r %%a in (*.png) do (
  18.     COPY "%%a" "%~dp0\PNG\%%~nxa"
  19. )
  20. for /r %%a in (*.gif) do (
  21.     COPY "%%a" "%~dp0\GIF\%%~nxa"
  22. )
  23. popd
  24. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement