我目前的批处理是这样的:
@echo off
set date=%~1
ping /n 83 127.1>nul
IF EXIST k:\public_html\website\nul rd k:\public_html\website /s/q
start /b xcopy /s/r/y/h/c D:\Inetpub\wwwroot\whbcn\public_html\*.* k:\public_html\>D:\Inetpub\wwwroot\whbcn\website_design\Log\updateServerB\%date%.log
goto :eof
exit
我想将里面几个路径放到一个配置文件中,而不是象现在一样写死在批处理里面.
比如配置文件fileConfig.ini内容:
BServerPathWeb=k:\public_html\website
AServerPath=D:\Inetpub\wwwroot\whbcn\public_html
BServerPath=k:\public_html
updateServerBLogPath=D:\Inetpub\wwwroot\whbcn\website_design\Log\updateServerB
我的批处理该怎样改进一下啊?多谢了!
@echo off
set date=%~1
ping /n 83 127.1>nul
IF EXIST k:\public_html\website\nul rd k:\public_html\website /s/q
start /b xcopy /s/r/y/h/c D:\Inetpub\wwwroot\whbcn\public_html\*.* k:\public_html\>D:\Inetpub\wwwroot\whbcn\website_design\Log\updateServerB\%date%.log
goto :eof
exit
我想将里面几个路径放到一个配置文件中,而不是象现在一样写死在批处理里面.
比如配置文件fileConfig.ini内容:
BServerPathWeb=k:\public_html\website
AServerPath=D:\Inetpub\wwwroot\whbcn\public_html
BServerPath=k:\public_html
updateServerBLogPath=D:\Inetpub\wwwroot\whbcn\website_design\Log\updateServerB
我的批处理该怎样改进一下啊?多谢了!
