Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set dir="c:\"
- for /R %dir% %%f in (*.7z) do (
- del %%f )
- cd /d d:\7-zip\
- 7za.exe a -t7z "c:\backup1.%date%.7z" d:\Myfiles -mx=9
- echo The folder has been archived and saved to c:\.
- echo.
- 7za.exe a -t7z "c:\backup2.%date%.7z" c:\Pics -mx=9
- echo The folder has been archived and saved to c:\.
- echo.
- 7za.exe a -t7z "c:\backup3.%date%.7z" "d:\mydocuments" -mx=9
- echo The folder has been archived and saved to c:\.
- cd /d c:\
- xcopy *.7z H:\Backups /F /C /Y
- net use Z: https://server.com /user:abc /persistent:no
- start Z:\
- explorer /e,C:\
- pause > nul
- exit
- What it does : This batch first deletes all old 7z-backups if there are any to delete and then goes on and compresses three folders using the 7za tool (find via google). Then it copies all three 7z-backups to an SUB flash drive with the letter H. After that it connects to a Webdav server and starts the explorer.
- (replace server.com with the correct webdav name and user with the correct user name)
Advertisement
Add Comment
Please, Sign In to add comment