同步网络文件批处理
Posted bob-wei
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了同步网络文件批处理相关的知识,希望对你有一定的参考价值。
1 @echo off 2 pushd "%~dp0" 3 title %~n0 (Running) 4 color 3f 5 6 set src=\192.168.0.10path ogo 7 set dst=. 8 set logfile="%~n0.log" 9 set haserr=0 10 11 echo * Creating log file: %logfile% 12 echo %DATE% %TIME%> %logfile% 13 echo * Result: %ERRORLEVEL% 14 call :copying "Bin" 15 call :copying "Config" 16 17 goto :END 18 19 :copying 20 echo. 21 echo * Copying %1 ... 22 robocopy "%src%\%~1" "%dst%\%~1" /MIR /Z /LOG+:%logfile% > nul 23 if ERRORLEVEL 8 ( 24 set haserr=1 25 color 4f 26 ) 27 echo * Result: %ERRORLEVEL% 28 goto :eof 29 30 :END 31 title %~n0 (Completed) 32 if %haserr% equ 0 color 2f 33 echo. 34 echo Press any key to EXIT... 35 pause > nul 36 title %ComSpec% 37 color 38 popd
以上是关于同步网络文件批处理的主要内容,如果未能解决你的问题,请参考以下文章
VSCode自定义代码片段14——Vue的axios网络请求封装
VSCode自定义代码片段14——Vue的axios网络请求封装