GlobalAccessSoftware

copies_backups.bat

Nov 16th, 2023
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 3.47 KB | Software | 0 0
  1.  
  2.  
  3. ::::::::::::::::::::::::::::::::::::::::::::::
  4. ::   This MoFo is "Some" Super-Workhorse!   ::::::
  5. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6. :: Made Generic Enough to Handle all instances of folders to backup. ::
  7. :: v7.9.7.73 20221108210854 by -JpE- for Global Access Computers!    ::
  8. :: Backs up Documents, Pictures, Favorites, DLs and Desktop.         ::
  9. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  10.  
  11. ::: RC4
  12. :copies
  13. @echo off
  14. set /a exit2=0
  15. set /a w=0
  16. set ttl1= ***** %oper% Backups Ultra Pro Deluxe 9
  17. set ttl2= *****
  18. title %ttl1%%ttl2%
  19.  
  20. set default=Documents
  21. ::set vers=7.9.8.92 20221203232425 by -JpE-
  22. set getw="%bats%\get_wipe_prefs.bat"
  23.  
  24. set ext0=just_externals.bat
  25. set ext1="%bats%\%ext0%"
  26. :: Those ^ 2 used in...
  27. set ext2="%bats%\copy_externals.bat"
  28.  
  29. set notonline="%bats%\not_online.bat"
  30. set status="%bats%\status_report.bat"
  31. set spcn=
  32.  
  33. if %oper% NEQ %default% goto skip
  34.  
  35. echo %l2%
  36. echo .
  37. echo %sl%
  38. echo          **  "Copier"  Backup-Pro Ultra Deluxe   **
  39. echo          **  %vers%   **
  40. echo %sl%
  41. echo .
  42. echo %l2%
  43. echo .
  44. echo %sl%
  45. echo                   %date% @ %time%
  46. echo %sl%
  47. echo .
  48.  
  49.  
  50. :skip
  51. echo %l2%
  52. echo .
  53. echo %sl%
  54.  
  55. :: restore Swaps source & destination & skips externals.
  56. if %r3v3rs3% neq 2 goto backup
  57. :: else swapfest
  58. set txt=%src%
  59. set src=%cps%
  60. set cps=%txt%
  61.  
  62. :: Source C: not found exception.
  63. if not exist %src% set /a w=5
  64. if %w% equ 5 call %notonline%
  65. if %w% equ 5 goto return
  66. :: So source not exist is HANDLED!
  67.  
  68.  
  69. :backup
  70. set nop=is NOT Online.
  71. set ol1=is now Online.
  72.  
  73. :: src is doc source folder on C: (w==5 if not found)
  74. set fld=%src%
  75. if exist %status% call %status%
  76. :: if not exist src already handled above.
  77.  
  78. :: cps is copies folder on D: (w==4 if not found)
  79. set fld=%cps%
  80. if exist %status% call %status%
  81.  
  82. ::::::::::::::::::::::::::::::::::
  83. :: GET STATUS OF EXTERNAL DRIVES
  84. ::::::::::::::::::::::::::::::::::
  85. :: bk1 is I: (w==1 if not found)
  86. set fld=%bk1%
  87. if exist %status% call %status%
  88. REM if not exist %fld% set /a w=1
  89.  
  90. :: bk2 is X: (w==2 if not found)
  91. set fld=%bk2%
  92. if exist %status% call %status%
  93. REM if not exist %fld% set /a w=2
  94.  
  95. :: bk3 is H: (w==3 if not found)
  96. set fld=%bk3%
  97. set spcn=        
  98. if exist %status% call %status%
  99. REM if not exist %fld% set /a w=3
  100.  
  101. :: bk4 is U: NEW not sure about w yet.
  102. set fld=%bk4%
  103. set spcn=
  104. if exist %status% call %status%
  105. rem end construction
  106.  
  107. echo %sl%
  108. echo .
  109.  
  110. if not exist %cps% set /a w=4
  111. if %w% equ 4 call %notonline%
  112.  
  113. set txt=Backup
  114. if %r3v3rs3% equ 2 set txt=Restore
  115. echo %l1%
  116. echo .
  117. echo %sl%
  118. echo            ***  %oper% %txt% Underway...   ***
  119. echo %sl%
  120. echo .
  121. echo %l1%
  122. time /t
  123. echo .
  124.  
  125. if not exist %getw% echo .
  126. if not exist %getw% echo %sl%
  127. if not exist %getw% echo           *** Get-Wipe Program NOT Found. ***
  128. if not exist %getw% echo %sl%
  129. if not exist %getw% echo .
  130. if exist %getw% call %getw%
  131.  
  132. title %ttl1%%ttl2%
  133. ::
  134. if %wipe% equ 4 if %exit2% equ 4 goto return
  135. :: ^ Cancel was chosen.
  136. ::
  137. if %w% equ 4 goto externals
  138. :: ^^^ cps isn't available.
  139.  
  140. if %wipe% GTR 0 if %wipe% neq 2 del /f /s /q %cps%"\"*.*
  141. xcopy %src%"\"*.* %cps% /D /E /V /C /F /G /R /K /Y /Z /B /J
  142. echo .
  143. time /t
  144. if %errorlevel% neq 0 set /a exit2=3
  145. if %errorlevel% neq 0 goto externals
  146.  
  147. set txt=Backed up
  148. if %r3v3rs3% equ 2 set txt=Restored
  149. echo %l1%
  150. echo       ** %oper% Successfully %txt% Onboard!  **
  151.  
  152.  
  153. :externals
  154. if exist %ext2% call %ext2%
  155.  
  156.  
  157. :return
  158.  
  159.  
  160.  
  161. :: 100% -JpE-
  162.  
  163.  
  164.  
  165.  
Add Comment
Please, Sign In to add comment