随笔分类 - bat脚本
摘要:@echo off color 0A :start ::cls echo 请输入文件路径: set /p srcfile= if not exist "%srcfile%" echo 文件不存在,请重新输入!!&goto :start if exist "%srcfile%\.\" echo 你输入
阅读全文
摘要:vbs,全称Microsoft Visual Basic Script Edition,是微软开发的一个基于Visual Basic的脚本语言,可以在windows上直接运行。 在vbs中我们可以通过sendkeys轻松的模拟发送各类按键和文字,但是直接发送中文字符会乱码,所以我们需要先将待发送的中
阅读全文
摘要:windows下的批处理没有直接获取时间戳的方式。 但是,可以通过第三方来获取。 ::get timestamp set "$=%temp%\Spring" >%$% Echo WScript.Echo(parseInt((new Date()).getTime()/1000)) for /f %%
阅读全文
摘要:一个通用批处理脚本,用于执行定时任务。 @echo off :begin choice /t 5 /c YN /d Y /M "Y:work N:stop. please input:" if errorlevel 2 goto stop if errorlevel 1 goto work :wor
阅读全文