Advertisement
Guest User

CMD first backupscript

a guest
Sep 22nd, 2014
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. @echo off
  2.  
  3.  
  4. color 0a
  5. echo Connect network-drive....
  6. echo.
  7. net use O: \\nas\backup /USER:backup /persistent:NO
  8.  
  9. echo Fullbackup or Incrementalbackup?
  10. echo.
  11. O:
  12. cd \pc-juli\daten\four_times
  13.  
  14.  
  15. rem Counting all the files in the folder to determine whether to perform a Fullbackup or an Incrementalbackup
  16. dir /b/s |find /v /c "::" > ..\counter.txt
  17.  
  18. set /P zahl=<..\counter.txt
  19.  
  20. rem if ten incrementalbackups have been done, it performs a fullbackup
  21. IF %zahl%==10 goto full
  22.  
  23. color 08
  24. echo Incrementalbackup
  25. echo.
  26. C:\Backup_pc_juli\incrementalbackup.bat
  27.  
  28. goto end
  29.  
  30.  
  31. :full
  32. color 08
  33. echo Fullbackup
  34. echo.
  35. C:\Backup_pc_juli\fullbackup.bat
  36.  
  37.  
  38.  
  39.  
  40. :end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement