摘要:最近调Jenkins job,遇到一个问题: 一个Jenkins job里面配置多个批处理脚本,如果其中某一个有fail的,其后面的批处理脚本全都不执行了。 解决办法: 在后面加上一个 || exit 0 返回0代表成功,非0代表了某种类型的错误,具体含义见截图。 举例: robot -o %dis
阅读全文
摘要:1. 批处理删除远程共享目录7天以上的文件和空文件夹 net use * /del /yes NET USE X: \\10.29.48.12\shares\Test password /user:DOMAIN1\account set AutoPath=X:\ %AutoPath:~0,2% pu
阅读全文
摘要:wmic /output:D:\installList.txt product get name,version
阅读全文
摘要:net use * /del /yes NET USE X: \\10.29.48.12\shares\Test password /user:DOMAIN1\account set AutoPath=X:\ %AutoPath:~0,2% pushd %AutoPath% cd /d %AutoPath% rem delete reports generated 7 days ago ...
阅读全文
摘要:DOS批处理中%cd%和%~dp0的区别 在DOS的批处理中,有时候需要知道当前的路径。 在DOS中,有两个环境变量可以跟当前路径有关,一个是%cd%, 一个是%~dp0。 这两个变量的用法和代表的内容是不同的。 1. %cd% 可以用在批处理文件中,也可以用在命令行中; 展开后,是驱动器盘符:+当
阅读全文
摘要:@echo clean DebugReport del /q /s /f \\%FILE_SERVER%\shares\DebugReport\*.* ping 127.0.0.1 -n 30 >nul for /f "delims=" %%a in ('dir /s /b /ad "\\%FILE_SERVER%\shares\DebugReport"') do (rd /q "%%a" 2>...
阅读全文
摘要:tasklist|findstr /i NRobotRemoteConsole.exe && taskkill /f /im NRobotRemoteConsole.exeexit 0
阅读全文
摘要:保存为deleteTempFiles.vbs,双击即可运行
阅读全文
摘要:net use * /del /yes NET USE Y: \\10.86.17.243\d$ Autotestpassword /user:MSDOMAIN1\doautotester set sourcePath="Y:\DOAutomationTest\automation_do_scrip
阅读全文
摘要:点击右键,选择Run as administrator
阅读全文
摘要:如果是Windows下的命令行,对于有空格的文件路径要加引号,对于xcopy命令就是源路径和目标路径都要加引号 xcopy "C:\ppt" "D:\Program doc"
阅读全文
摘要:在Jenkins建了一个task自动启动Selenium的Grid,命令行是这样写的: schtasks /end /tn RestartGrid /s SZTEST201606 /u szdomain1\szautotester /p 123456schtasks /run /tn Restart
阅读全文
摘要:@echo offrem connect to szotpc801net use * /del /yesNET USE X: \\10.66.234.95\d$ Autotest123 /user:SZDOMAIN1\autotester set AutoPath=%~dp0%AutoPath:~0...
阅读全文
摘要:echo. >> %WINDIR%\system32\drivers\etc\hosts & echo xxx.xxx.xxx.xx test_host >> %WINDIR%\system32\drivers\etc\hosts
阅读全文
摘要:@echo offset sourcePath=D:\DOAutomationTest\automation_do_ma_soapui\TestResult\PAset targetPath=\\szotwin2k801\AutomationReport\PAset directoryName=%d...
阅读全文
摘要:在命令行窗口输入“shutdown -s”, 关闭远程计算机在命令行窗口输入“shutdown -r”, 重新启动远程计算机
阅读全文
摘要:set reportPath=D:\AutomationReportcd /d %reportPath%forfiles /p %reportPath% /s /m *.xml /d -7 /c "cmd /c del /f @path">nul 2>nulfor /f "tokens=*" %%a...
阅读全文
摘要:open a cmd window and type reg query "HKCU\Control Panel\International" which will show you the values as you want them.Then to modify them, use REG A...
阅读全文
摘要:TASKKILL /F /IM cmd.exe /T
阅读全文