腳本以下:html
進行cmd命令窗口windows
type kuaipan_daily_build_and_resource.batide
echo "enter D,delete virtual machine's files and copy backup files"
rd /q /s D:\kuaipan_everyday_1
rd /q /s D:\kuaipan_everyday_2
rd /q /s D:\kuaipan_everyday_3
xcopy /y /e D:\kuaipan_everyday_bak
echo "enter E,starting new machine"
cd
vmrun.exe -T ws start "D:\kuaipan_everyday_1\kuaipan_everyday_1.vmx"
timeout /t
vmrun.exe -T ws start "D:\kuaipan_everyday_2\kuaipan_everyday_2.vmx"
timeout /t
vmrun.exe -T ws start "D:\kuaipan_everyday_3\kuaipan_everyday_3.vmx"
timeout /t
echo "enter F,delete virtual machine's files and copy backup files"
rd /q /s F:\every-member
md F:\every-member
xcopy /y /e F:\every-member-bak F:\every-member
echo "enter E,starting new machine"
cd
vmrun.exe -T ws start "F:\every-member\three-machine\one\one.vmx"
timeout /t 6
vmrun.exe -T ws start "F:\every-member\three-machine\two\two.vmx"
timeout /t 6
vmrun.exe -T ws start "F:\every-member\three-machine\three\three.vmx"
exit
批處理:
del 刪除文件命令/q/f強行刪除不提示肯定
rd 刪除文件夾命令/q/s強行刪除不提示肯定
xcopy /y /e(/y:不提示直接覆蓋
1.控制面板--計劃任務---右鍵點擊新建任務
2
3.新建觸發器
4.添加批處理腳本