I'm a newbie in network computer and i'm going to learn manything.
Please someone help me to understand it. I knew something below but i cannot find out what exactly "bk a" command to do ( only search it on google without any idea about the keyword )
It's not important about the day/time command at this time athough i dont understand it. i'm going to learn it later.
Thank you if you are reading my post.
Color 1F
Echo Number 3 - Blue
Echo Backup ServerADB after 15:30 everyday, running every hour!
xCopy "\\File-server2\ACT\Quynh\*.*" "C:\OneDrive\ACTData\Quynh\*.*" /D/E/Y
:START
set d=%date:~0,2%
set m=%date:~3,2%
set hr=%time:~0,2%
set mn=%time:~3,2%
set /a y=%date:~6,4%
if %d% gtr 31 (
set /a m+=1
if %m% gtr 12 (
set m=1
set /a m+=1
)
if /I %m% LSS 10 set m=0%m%
if /I %d% LSS 10 set d=0%d%
)
If %hr% EQU 16 goto :Rar_Copy
If %hr% EQU 17 goto :Rar_Copy
If %hr% LSS 16 goto :Waiting
If %hr% GTR 18 goto :Waiting
:Rar_Copy
If exist "\\ServerA\data\A Backup Databases\%y%-%m%-%d%" goto :EXIST
If not exist "\\ServerA\data\A Backup Databases\%y%-%m%-%d%" goto :mkdir
:mkdir
md "\\File-Server1\D$\Admin\%y%-%m%-%d%"
bk a "\\File-Server1\D$\Admin\%y%-%m%-%d%\A.rar" "\\ServerA\D$\A.Dat" /Y
bk a "\\File-Server1\D$\Admin\%y%-%m%-%d%\B.rar" "\\ServerA\D$\SwireSys.Dat" /Y
bk a "\\File-Server1\D$\Admin\%y%-%m%-%d%\C.rar" "\\ServerA\D$\B.Dat" /Y
bk a "\\File-Server1\D$\Admin\%y%-%m%-%d%\D.rar" "\\ServerA\D$\LHSys.Dat" /Y
bk a "\\File-Server1\D$\Admin\%y%-%m%-%d%\E.rar" "\\ServerA\D$\BNApp.Dat" /Y
bk a "\\File-Server1\D$\Admin\%y%-%m%-%d%\F.rar" "\\ServerA\D$\BNSys.Dat" /Y
Echo xCopy "\\File-Server1\D$\Admin\%y%-%m%-%d%\*.*" "S:\%y%-%m%-%d%\*.*" /D/E/Y
xCopy "\\File-Server1\D$\Admin\%y%-%m%-%d%\*.*" "\\ServerA\data\A Backup Databases\%y%-%m%-%d%\*.*" /D/E/Y
xCopy "\\File-Server1\D$\Admin\%y%-%m%-%d%\*.*" "C:\OneDrive\ACTData\%y%-%m%\*.*" /Y
xCopy "\\File-server2\ACT\Cuc\*.*" "C:\OneDrive\ACTData\Cuc\*.*" /D/E/Y
xCopy "\\File-server2\ACT\Huong\*.*" "C:\OneDrive\ACTData\Huong\*.*" /D/E/Y
:EXIST
Echo The folder : "\\ServerA\data\A Backup Databases\%y%-%m%-%d%" is exist !
:Waiting
set /a d+=1
if /I %d% LSS 10 set d=0%d%
if %d% gtr 31 (
set /a m+=1
)
Echo The Last Running Time :%Date%,%hr%:%mn%
set /a hr=%time:~0,2%+1
Echo The Next Running Time :%Date%,%hr%:%mn%
timeout /t 3599
GOTO :START
Echo The Next Running Time :%d%/%m%/%y%,%Time%