Advertisement
GlobalAccessSoftware

outlook_handler.bat

Nov 16th, 2023
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 8.12 KB | Software | 0 0
  1.  
  2.  
  3. ::: RC6
  4. :start
  5. @echo off
  6. set /a netw=0
  7. set sl=         /*\/*\/*\/*\/*\/*\/*\/*\/*\/*\/*\/*\/*\/*\
  8. set l1=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  9. set l2=\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  10.  
  11. ::::::::::::::::::::::::::::::::::::::::::::::::
  12. set appname=Outlook Handler Ultra Deluxe Pro
  13. :::::::::::::::::::::::::::::::::::v::::::::::::
  14. ::set vers=7.9.9.02 20221219053021 by -JpE-
  15. :::::::::::::::::::::::::::::::::::v::::::::::::
  16. title %appname%
  17. echo .
  18. echo %sl%
  19. echo               %appname%
  20. echo %sl%
  21. echo            **** %vers%
  22. echo %sl%
  23. echo .
  24. echo %l1%
  25.  
  26. :outlook
  27. set source="C:\Users\%username%\AppData\Local\Microsoft\Outlook"
  28. set destin="D:\Copies\My Outlook"
  29. ::
  30. set daddio="\\Daddio-PC\Users\Admin\AppData\Local\Microsoft\Outlook"
  31. set guruji="\\GURUJIMON-PC\Users\Gurujimon\AppData\Local\Microsoft\Outlook"
  32. ::
  33. set backup1="I:\Copies\My OutLook"
  34. set backup2="X:\%username%-PC\My Outlook"
  35. set backup3="H:\Aspire\OutLook"
  36. set backup4="U:\Copies\My Outlook"
  37. set backup5="R:\Samsung Backups\SmartSwitch"
  38. ::
  39. echo %time%
  40. echo .
  41. ::
  42. if exist %source% echo Source NOW  Online! (C:) %source%
  43. if exist %destin% echo Destination Online! (D:) %destin%
  44. if exist %daddio% echo DaddioPC is Online! (C:) %daddio%
  45. if exist %guruji% echo WOW! Even Gurujimon is On-Line!
  46. echo .
  47.  
  48. :: New code intermixed: The "ex" mods.
  49. set /a ex=0
  50. if exist %backup1% set /a ex+=1
  51. if exist %backup1% echo Backup1  is online! (I:) %backup1%
  52. if exist %backup2% set /a ex+=1
  53. if exist %backup2% echo Seagate7 is online! (X:) %backup2%
  54. if exist %backup3% set /a ex+=1
  55. if exist %backup3% echo Seagate1 is online! (H:) %backup3%
  56. if exist %backup4% set /a ex+=1
  57. if exist %backup4% echo Seagate16`s online! (U:) %backup4%
  58. if exist %backup5% set /a ex+=1
  59. if exist %backup5% echo Middle Earth is up! (R:) %backup5%
  60.  
  61. ::: AND They are UGE, These last 2 are 5 1/3 TB each! H: (slow USB connection) and X: (full speed sata driver bay with esata connection, speed just like it's an internal drive.) And that doesn't include the third 5 1/3 TB partition. But remember, this 16 TB drive is not MBR style partition tables, they are required to be be used as GUID due to overall size larger than 5 TB, where it is actually 16 TB unpartitioned, but even with 3 fairly equal GPTs they are over 5.3 terabytes each. That's 5,085,465 Megabytes each! 16 million million bytes in all.
  62.  
  63. set drv=drive
  64. if %ex% gtr 1 set drv=drives
  65. if %ex% gtr 0 echo .
  66. if %ex% gtr 0 echo **   %ex% external %drv% currently available for backups.   **
  67. REM if %ex% gtr 0 echo .
  68. REM echo %time%
  69.  
  70.  
  71. :ol1
  72. set /a e=0
  73. if not exist %source% set /a e=1
  74. if not exist %source% goto err2
  75. if not exist %destin% set /a e=2
  76. if not exist %destin% goto ol2
  77. echo %l2%
  78. echo        ***** Now Syncing your Outlook Calendar  *****
  79. echo %l2%
  80. echo %time%
  81. echo .
  82. ::: NOTE: source and destin nation already set for this first call, ONLY.
  83. call :copier
  84. echo .
  85. echo %time%
  86. ::
  87. if %errorlevel% neq 0 set /a e=3
  88. if %errorlevel% neq 0 goto ol2
  89. echo %l2%
  90. echo   **** Outlook Successfully Backed Up to D: FreeSpace ****
  91. echo %l2%
  92. echo .
  93.  
  94. :ol2
  95. if not exist %daddio% set /a e=4
  96. if not exist %daddio% goto ol3
  97. REM echo %l2%
  98. echo        *****   Now Syncing Calendar to Daddio   *****
  99. echo %l2%
  100. echo %time%
  101. echo .
  102. set destin=%daddio%
  103. ::: Same Source
  104. call :copier
  105. echo .
  106. echo %time%
  107. if %errorlevel% neq 0 set /a e=5
  108. if %errorlevel% neq 0 goto ol3
  109. echo %l2%
  110. set netw=1
  111. echo    *****  Outlook Successfully Synced with Daddio!   *****
  112. echo %l2%
  113. echo .
  114. echo .
  115.  
  116. :ol3
  117. if not exist %backup1% set /a e=6
  118. if not exist %backup1% goto ole
  119. echo %l2%
  120. echo        *****   Now Syncing Calendar to %backup1:~1,2%  *****
  121. echo %l2%
  122. echo %time%
  123. echo .
  124. ::: Same source
  125. set destin=%backup1%
  126. call :copier
  127. echo .
  128. echo %time%
  129. if %errorlevel% neq 0 set /a e=7
  130. if %errorlevel% neq 0 goto ole
  131. echo %l2%
  132. echo        **** Outlook Successfully Synced with %backup1:~1,2%  ****
  133. echo %l2%
  134. echo .
  135. echo .
  136.  
  137. :: Added Recently for H: v7.9.7.63-64
  138. :ole
  139. if not exist %backup3% set /a e=16
  140. if not exist %backup3% goto olu
  141. echo %l2%
  142. echo        *****   Now Syncing Calendar to %backup3:~1,2%  *****
  143. echo %l2%
  144. echo %time%
  145. echo .
  146. set destin=%backup3%
  147. ::: Still the same source.
  148. call :copier
  149. echo .
  150. echo %time%
  151. if %errorlevel% neq 0 set /a e=17
  152. if %errorlevel% neq 0 goto olu
  153. echo %l2%
  154. echo        **** Outlook Successfully Synced with %backup3:~1,2%  ****
  155. echo %l2%
  156. echo .
  157. echo .
  158.  
  159. :: Added Recently for U: v7.9.8.94
  160. :olu
  161. if not exist %backup4% set /a e=18
  162. if not exist %backup4% goto ol4
  163. echo %l2%
  164. echo        *****   Now Syncing Calendar to %backup4:~1,2%  *****
  165. echo %l2%
  166. echo %time%
  167. echo .
  168. ::: Still the same source, just set the destination and make the call!
  169. set destin=%backup4%
  170. call :copier
  171. echo .
  172. echo %time%
  173. if %errorlevel% neq 0 set /a e=19
  174. if %errorlevel% neq 0 goto ol4
  175. echo %l2%
  176. echo        **** Outlook Successfully Synced with %backup4:~1,2%  ****
  177. echo %l2%
  178. echo .
  179. echo .
  180.  
  181. :ol4
  182. if not exist %backup2% set /a e=8
  183. if not exist %backup2% goto ol5
  184. echo %l2%
  185. echo        *****  Now Syncing Calendar to %backup2:~1,2% *****
  186. echo %l2%
  187. echo %time%
  188. echo .
  189. set destin=%backup2%
  190. ::: Last one ^ with that primary source. Next it turns around for full synchronization.
  191. call :copier
  192. echo .
  193. echo %time%
  194. if %errorlevel% neq 0 set /a e=9 & goto ol5
  195. echo %l2%
  196. echo        **** Outlook Successfully Synced with %backup2:~1,2%  ****
  197. echo %l2%
  198. REM echo %time%
  199. echo .
  200. echo .
  201.  
  202.  
  203. :ol5
  204. if not exist %guruji% set /a e=10 & goto ol8
  205. echo %l2%
  206. echo        *****  Now Syncing Calendar to Guruji   *****
  207. echo %l2%
  208. echo %time%
  209. echo .
  210. set /a netw+=2
  211.  
  212. ::  Wipe variable documentation:
  213. ::  0==wipe none
  214. ::  1==just backups on D:
  215. ::  2==all backup drives.
  216. ::  3==network systems also.
  217.  
  218. ::: So now we must set more than the destination We also set the source here a few places to synchonize back to what we synchronized with. 380 degree synchronicity.
  219. set source=%destin%
  220. set destin=%guruji%
  221. call :copier
  222. echo .
  223. echo %time%
  224. if %errorlevel% neq 0 set /a e=11
  225. if %errorlevel% neq 0 goto ol8
  226. echo %l2%
  227. echo      **** Outlook Successfully Synced with Guruji  ****
  228.  
  229. if not exist %daddio% set /a e=13
  230. if not exist %daddio% goto ol8
  231. echo %l2%
  232. echo        ***** Now Syncing Guruji Calendar to Daddio *****
  233. echo %l2%
  234. echo %time%
  235. echo .
  236. set source=%destin%
  237. ::: Turn ^v it around again for full Duplux sync
  238. set destin=%daddio%
  239. call :copier
  240. echo .
  241. echo %time%
  242. if %errorlevel% neq 0 set /a e=12
  243. if %errorlevel% neq 0 goto ol8
  244. echo %l2%
  245. echo        **** Guruji Successfully Synced with Daddio ****
  246.  
  247.  
  248. :ol8
  249. if not exist %daddio% set /a e=13
  250. if not exist %daddio% goto ol6
  251. echo %l2%
  252. echo         ***** Now Syncing Daddio Calendar to %username%  *****
  253. echo %l2%
  254. echo %time%
  255. echo .
  256. ::: Swapping these two around on the fly, surely!
  257. set surely=%source%
  258. set source=%destin%
  259. set destin=%surely%
  260. call :copier
  261. echo .
  262. echo %time%
  263. if %errorlevel% neq 0 set /a e=14
  264. if %errorlevel% neq 0 goto ol6
  265. echo %l2%
  266. echo      **** Outlook Successfully Synced from Daddio  ****
  267.  
  268.  
  269. :ol6
  270. :: Some erred but were forgiven!
  271. if %e% neq 0 goto err2
  272. if %netw% equ 0 echo %l2%
  273. if %netw% equ 0 echo     ***** No Network Systems are Currently Online  *****
  274. if %netw% equ 0 echo %l2%
  275. if %netw% equ 0 goto ol7
  276. if %netw% gtr 1 set /a netw+=-1
  277. echo %l2%
  278. set sys=System
  279. if %netw% equ 2 set sys=Systems
  280. echo **** Outlook Successfully Synced with %netw1% Network %sys%  ****
  281. echo %l2%
  282.  
  283.  
  284. :ol7
  285. echo .
  286. echo %sl%
  287. echo         *** Completion: %date% @ %time% ***
  288. echo %sl%
  289. echo .
  290. goto return
  291.  
  292.  
  293. ::: Special Function saves some redundancy. Reusing it fully!
  294. :copier
  295. (
  296.     if %clroutdest% gtr 1 del /f /s /q %destin%"\"*.*
  297.     xcopy %source%"\"*.* %destin% /D /E /V /C /F /G /R /K /Y /Z /B /J
  298.     exit /b %errorlevel%
  299. )
  300. ::: The 'Engine' ^ of this module. ^ Heart and soul! ^ ^ ^
  301.  
  302. :err2
  303. set /a goat=1
  304. set outlookerr="%bat%\outlook_error_handler.bat"
  305. if exist %outlookerr% call outlookerr
  306.  
  307. ::: outlookerr Doc (of sorts)
  308. ::: goes to either ol6 or ol7.
  309. if %goat% equ 6 goto ol6
  310. if %goat% equ 7 goto ol7
  311.  
  312.  
  313. :return
  314.  
  315.  
  316.  
  317. :::::::::::::::::
  318. ::     EOF     ::
  319. :::::::::::::::::
  320. :: 100%  -JpE- ::
  321. :::::::::::::::::
  322.  
  323.  
  324.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement