Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. SET srcdir=C:\test\
  2. SET dstdir=C:\ZipBackups\
  3.  
  4. SET datenow=%date:~-4,4%%date:~-7,2%%date:~-10,2%
  5.  
  6. CD /d %srcdir%
  7.  
  8. "C:\Program Files\7-Zip\7z.exe" a -r -bd -y "%dstdir%\archive_%datenow%.zip" "%srcdir%\*"
  9.  
  10. forfiles /S /D -7 /P %dstdir% /M *.zip /C "cmd /c del /F @path"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement