Advertisement
GlobalAccessSoftware

SyncronizeMatchedFiles.bat

Nov 16th, 2023
827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.70 KB | Software | 0 0
  1.  
  2.  
  3. :start
  4.   @echo off
  5.   if "%caller%" neq "Defined" cls
  6.   title SyncronizeMatchedFiles Utility:
  7.   if not defined vers set vers=v8.7.0.02 20231006232214 by -JpE-
  8.   echo .
  9.   echo *********************************************
  10.   echo *  Syncing Matched Files, Please Stand-By.  *
  11.   echo *********************************************
  12.   echo *  Original Version 2.1.1.4 20220425234207  *
  13.   echo *********************************************
  14.   echo *  Update %vers% *
  15.   echo *********************************************
  16.  
  17.   echo .
  18.   title Sync Matched Files by JpE for JpE-PC
  19.  
  20.   REM **************************************************
  21.  REM set msg="Turn on Echo Now? (No): "
  22.  REM choice /c yn /t 3 /d n /m %msg%
  23.  REM if %errorlevel% equ 1 echo on
  24.  REM echo .
  25.   set /A task=0
  26.   set ok="Success! Task Completed. "
  27.   set no=""
  28.   echo .
  29.   set msg="Sync Smesa7 to Offline Files shared with Daddio? (Yes): "
  30.   choice /c yn /n /t 5 /d y /m %msg%
  31.   if %errorlevel% EQU 2 goto sync
  32.  
  33.   echo .
  34.   set /A bla=0
  35.   set source="C:\Users\JpE\Documents\Visual Studio 2010\Projects\My Editor Suite\Smesa7"
  36.   set destin="\\DADDIO-PC\Projects\My Editor Suite\Smesa7\"
  37.   if %bla% EQU 1 del /f /s /q %destin%"\"*.*
  38.   xcopy %source%"\"*.* %destin% /D /E /V /C /F /G /R /K /Y /Z /B /J
  39.  REM   *****************************************************
  40.  REM pause
  41.  REM
  42.   echo .
  43.   set msg=%ok%
  44.   if %errorlevel% EQU 0 set /A task+=1
  45.   if %errorlevel% NEQ 0 set msg=%no%
  46.   choice /c k /n /t 3 /d k /m %msg%
  47.  
  48. :sync
  49.   echo .
  50.   set msg="Sync the Daddio Synchronized Folder to JpE? (No): "
  51.   choice /c yn /n /t 5 /d n /m %msg%
  52.   if %errorlevel% NEQ 1 goto result
  53.  REM else
  54.  REM pause
  55.   set /A bla=0
  56.   set source="\\DADDIO-PC\Projects\My Editor Suite\Smesa7"
  57.   set destin="C:\Users\JpE\Documents\Visual Studio 2010\Projects\My Editor Suite\Smesa7"
  58.  
  59.   if %bla% EQU 1 del /f /s /q %destin%"\"*.*
  60.   xcopy %source%"\"*.* %destin% /D /E /V /C /F /G /R /K /Y /Z /B /J
  61.  REM pause
  62.   echo .
  63.   set msg=%ok%
  64.   if %errorlevel% EQU 0 set /A task+=1
  65.   if %errorlevel% NEQ 0 set msg=%no%
  66.   choice /c k /n /t 3 /d k /m %msg%
  67.  
  68. :result
  69.   echo .
  70.   set txt1=Program was
  71.   set txt2=%txt1%Un
  72.   if %task% EQU 1 set txt2=%txt1%Partly
  73.   if %task% EQU 2 set txt2=%txt1%Fully
  74.   set txt3=%txt2%Successful.
  75.   if "%caller%" equ "Defined" goto theend
  76.   echo %line% & echo %txt3% Exiting in 7 seconds! & echo %line%
  77.   echo .
  78.   set msg="R)estart Program, P)ause Program, E)nd Program: "
  79.   choice /c rpe /n /t 7 /d e /m %msg%
  80.   if %errorlevel% EQU 1 goto start
  81.   if %errorlevel% EQU 2 echo .
  82.   if %errorlevel% EQU 2 pause
  83.  
  84. :theend
  85.   echo .
  86.   echo The End!
  87.   echo .
  88.   echo Bye Bye!
  89.  REM pause
  90.   exit /b %errorlevel%
  91.  
  92.  
  93.  
  94. ::: 100% -JpE-
  95.  
  96.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement