upload.bat脚本,第一个脚本不知道为什么.老是返回两个errorlevel值0和1,怎么回事啊- @echo off
- cd /d d:\web\"%1"
- attrib -s -h
- for %%a in (web.config,SPSideConfig.xml,KDOnlineLog.txt,images,iflyimages,TemplateFile) do attrib +s +h %%a
- del /q /f *.*
- for /d %%a in (*) do rd /s /q "%%a"
- for /f "delims=" %%a in ('dir /a /b') do attrib -h -s "%%a"
-
- xcopy /s/e/y/h/R d:\update\%2\%3\%4 d:\web\%1 >>d:\iislog.txt
- cacls.exe d:\web\"%1"\TemplateFile /e /t /g "network service":F >>d:\iislog.txt
- cacls.exe d:\web\"%1"\kdonlinelog.txt /e /t /g "network service":F >>d:\iislog.txt
-
- if errorlevel 0 echo 0
- if errorlevel 1 echo 1
复制代码 执行后upload.bat hk liang_04061025 uploadall online
目的可以达到,但是老是返回0和1,怎么回事呢?- @echo off
-
- rd /q /s d:\web\%1\ >d:\iislog.txt
- mkdir d:\web\%1 >d:\iislog.txt
-
- xcopy /s/e/y/h/R d:\update\%2\%3\%4 d:\web\%1 >>d:\iislog.txt
- copy /y d:\web_bak\%2\%1\kdonlinelog.txt d:\web\%1\ >>d:\iislog.txt
- copy /y d:\web_bak\%2\%1\web.config d:\web\%1\ >>d:\iislog.txt
- copy /y d:\web_bak\%2\%1\spsideconfig.xml d:\web\%1\ >>d:\iislog.txt
-
- cacls.exe d:\web\%1\TemplateFile /e /t /g "network service":F >>d:\iislog.txt
- cacls.exe d:\web\%1\kdonlinelog.txt /e /t /g "network service":F >>d:\iislog.txt
-
- if errorlevel 0 echo 0
- if errorlevel 1 echo 1
复制代码 目的可以达到,只返回0,这是我要的结果. |