bat 定时远程copy 文件夹

set USER=Administrator
set PASSWORD=pass01!
set Server1_IP=172.22.14.111

set SERVER_ROOT=%Server1_IP%\D$\MPServer

ping -n 1 %Server1_IP% >nul
if %errorlevel% equ 0 (
goto updata
)

:updata
echo make the netbios connection to server
net use \\%SERVER_ROOT% %PASSWORD% /user:%USER%

echo copy MPFTP to local
xcopy /d /y /e /q \\%SERVER_ROOT% "D:\MPServer"

echo client side script finished.

你可能感兴趣的:(copy)