Advertisement
Najeebsk

7ZIP-Dir,bat

Nov 20th, 2022
1,206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.43 KB | None | 0 0
  1. for %%a in ("%cd%") do set "CurDir=%%~na"
  2. set thedir=%CurDir%
  3.  
  4. set mydate=%date:~12,2%%date:~4,2%%date:~7,2%
  5. set TIMEZERO=%TIME: =0%
  6. set HOUR=%TIMEZERO:~0,2%
  7. set MIN=%TIMEZERO:~3,2%
  8. set mytime=%HOUR%%MIN%
  9. set zformat=zip
  10.  
  11. set extraoptions=-xr!Temp -xr!Junk
  12.  
  13. set zcmd="c:\program files\7-zip\7z" a -t%zformat% -r %extraoptions%
  14. set fname=%thedir%_%mydate%_%mytime%.%zformat%
  15.  
  16. echo %zcmd% ..\%fname% .\
  17. %zcmd% ..\%fname% .\
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement