Advertisement
Falkerz

DatumVonCopy1.2.1

Oct 29th, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. @echo off
  2. :: variables
  3. set drive=E:\Datum-BACKUPS
  4. for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
  5. set dow=%%i
  6. set month=%%j
  7. set day=%%k
  8. set year=%%l
  9. )
  10. set datestr=%month%.%day%.%year%
  11. set legacybackupCmd=xcopy /s /c /d /e /h /i /r /y
  12. set backupCmd=ROBOCOPY
  13.  
  14. echo ########################################
  15. echo # Files Backup Script #
  16. echo ########################################
  17. echo .
  18.  
  19. :: Documents directory
  20. echo # Backing up Documents directory... #
  21. %backupCmd% "%USERPROFILE%\Documents" "%drive%\%datestr%\Documents" /MIR
  22. echo # Documents directory backup complete! #
  23. echo .
  24.  
  25. :: Pictures directory
  26. echo # Backing up Pictures directory... #
  27. %backupCmd% "%USERPROFILE%\Pictures" "%drive%\%datestr%\Pictures" /MIR
  28. echo # Pictures directory backup complete! #
  29. echo .
  30.  
  31. :: Videos directory
  32. echo # Backing up Videos directory... #
  33. %backupCmd% "%USERPROFILE%\Videos" "%drive%\%datestr%\Videos" /MIR
  34. echo # Videos directory backup complete! #
  35. echo .
  36.  
  37. echo ########### Backup complete! ###########
  38. @pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement