bat 拷贝文件并记录日志
@echo on
set ymd=%date:~0,4%%date:~5,2%%date:~8,2%
set hour=%time:~0,2%
if /i %hour% lss 10 (set hour=0%hour:~1,1%)
set ymd_t=%ymd%_%hour%%time:~3,2%%time:~6,2%
iisreset test1
Xcopy \\RemoteFilePath\src\*.* E:\UPM_ReadyDeploy\ /s/e/r/y >> E:\GetDeployPackage/log/log-%ymd_t%.txt
Xcopy \\RemoteFilePath\src\MyProj.WebUI\bin\*.dll E:\LocalFile\MyProj.WebUI\bin\ /s/e/r/y
Xcopy \\RemoteFilePath\src\MyProj.WebUI\bin\*.pdb E:\LocalFile\MyProj.WebUI\bin\ /s/e/r/y
Xcopy \\RemoteFilePath\src\MyProj.WebService\bin\*.dll E:\LocalFile\MyProj.WebService\Release\ /s/e/r/y
Xcopy \\RemoteFilePath\src\MyProj.WebService\bin\*.pdb E:\LocalFile\MyProj.WebService\Release\ /s/e/r/y
iisreset test1
set ymd=%date:~0,4%%date:~5,2%%date:~8,2%
set hour=%time:~0,2%
if /i %hour% lss 10 (set hour=0%hour:~1,1%)
set ymd_t=%ymd%_%hour%%time:~3,2%%time:~6,2%
iisreset test1
Xcopy \\RemoteFilePath\src\*.* E:\UPM_ReadyDeploy\ /s/e/r/y >> E:\GetDeployPackage/log/log-%ymd_t%.txt
Xcopy \\RemoteFilePath\src\MyProj.WebUI\bin\*.dll E:\LocalFile\MyProj.WebUI\bin\ /s/e/r/y
Xcopy \\RemoteFilePath\src\MyProj.WebUI\bin\*.pdb E:\LocalFile\MyProj.WebUI\bin\ /s/e/r/y
Xcopy \\RemoteFilePath\src\MyProj.WebService\bin\*.dll E:\LocalFile\MyProj.WebService\Release\ /s/e/r/y
Xcopy \\RemoteFilePath\src\MyProj.WebService\bin\*.pdb E:\LocalFile\MyProj.WebService\Release\ /s/e/r/y
iisreset test1
走向地狱的途中,不小心走了程序员这条路,路上一个个黑心的老板,和暗无天日的加班,我才发现,通往地狱的路径中,我们这行是最短的。