@echo off
for /f "delims=" %%a in (config.ini) do set "%%a"
set "dates=%~1"&rem 请不要将变量写成系统变量名
ping /n 83 127.1>nul
if exist "%BServerPathWeb%" rd /s /q "%BServerPathWeb%"
start /b xcopy /s /r /y /h /c "%AServerPath%\*.*" "%BServerPath%\>%updateServerBLogPath%\%dates%.log"
现在在运行的时候,会提示?:
"目标k:\public_html\>D:\Inetpub\wwwroot\whbcn\website_design\Log\updateServerB\%date%.log 是文件名还是目录名 <F = 文件. D = 目录>?"
怎样去掉提示啊?而且现在并没有把旧的文件夹k:\public_html\website删掉,也没有拷贝路径D:\Inetpub\wwwroot\whbcn\public_html\下的所有文件到k:\public_html\下.
修改后的文件:
@echo off
for /f "delims=" %%a in (pathConfig.ini) do set "%%a"
set "dates=%~1"&rem
ping /n 83 127.1>nul
if exist "%BServerPathWeb%\nul" rd /s/q "%BServerPathWeb%"
start /b xcopy /s/r/y/h/c "%AServerPath%\*.*" "%BServerPath%\>%updateServerBLogPath%\%dates%.log"
goto :eof
exit
谢谢!