vir0e5

Multiple ZIP PDF Only

Nov 29th, 2021 (edited)
424
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @ECHO ON
  2.  
  3. SET SourceDir=<DIR>
  4. SET DestDir=<DESTINATION_DIR>
  5.  
  6. CD /D "C:\Program Files\7-Zip"
  7. FOR /F "TOKENS=*" %%F IN ('DIR /B /A-D "%SourceDir%\*.pdf"') DO (
  8.     7z.exe a "%DestDir%\%%~NF.zip" "%SourceDir%\%%~NXF"
  9. )
  10.  
  11. ::Script For Current DIR
  12. :: FOR %%i IN (*.pdf*) DO "c:\Program Files\7-Zip\7z.exe" a "%%~ni.zip" "%%i"
  13. EXIT
RAW Paste Data