Advertisement
GlobalAccessSoftware

playlist_errors.bat

Nov 16th, 2023
903
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.09 KB | Software | 0 0
  1.  
  2.  
  3. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4. :::      playlist_errors.bat v7.9.8.96 20221210180821 by -JpE-      :::
  5. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6. :::   Custom Exception Handling Routine written 20220525021245.21   :::
  7. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  8. ::set vers=v7.9.9.03 20221219054011 by -JpE-
  9.  
  10. :: bak 4 means Finish Simple-Backup Early. IF err!=3 Success!
  11. if %bak% equ 4 if %err% neq 3 goto return
  12. ::
  13. echo . & echo %sl%
  14. set fe=     ****   This is a Fatal Error to current Operations.  ****
  15. set nf=       **** Error is Non-Fatal, so we continue.  ****
  16. ::
  17. :: err 1 is no source, not so fatal error.
  18. if %err% equ 1 echo . & echo          ****   Playlist Source Folder NOT Found!   ****
  19. if %err% equ 1 echo %sl%
  20. if %err% equ 1 echo %nf%
  21. ::
  22. :: err 2 is no docs folder, very fatal.
  23. if %err% equ 2 echo . & echo           ****   Users Documents Folder not found.   ****
  24. if %err% equ 2 echo %sl%
  25. if %err% equ 2 echo %fe%
  26. ::
  27. :: err 3 is problem copying those. Nearly Fatal Error.
  28. if %err% equ 3 echo . & echo          ****   Problem Backing up Original folder.   ****
  29. if %err% equ 3 echo %sl%
  30. if %err% equ 3 echo %nf%
  31. ::
  32. :: If any of those then we're done here. For now.
  33. if %err% lss 4 echo .
  34. if %err% lss 4 %sl%
  35. if %err% lss 4 echo .
  36. if %err% lss 4 echo %l2%
  37. if %err% lss 4 goto return
  38. ::: implicite ^ %err% gtr 3 for the below.
  39. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  40.  
  41. ::: Design Note to Dev: If x/2 equal remainder (modulus) of 0 it's even ie. offline, otherwise it is implicitely odd ie. a problemo.
  42. ::: Thus, if mod is zero it's even number, if non-zero it's an odd number.
  43. set /a "mod=%err% %% 2%"
  44. if %mod% equ 0 echo      ****   %mtxt% (%dir%) is currently offline.   ****
  45. if %mod% equ 0 echo %sl% & echo %nf%
  46. ::
  47. if %mod% equ 0 goto return
  48. ::
  49. if %mod% neq 0 echo      ****  There was a problem copying to (%dir%)  ****
  50. if %mod% neq 0 echo %sl% & echo %nf
  51.  
  52.  
  53. :return
  54. echo %sl%
  55. echo .
  56. echo %l1%
  57.  
  58.  
  59.  
  60. :::  100%  -JpE-
  61.  
  62.  
  63.  
  64.  
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement