这两天由于工作用到BAT脚本, 遇到了麻烦问题:写TXT log时候报错 -- “文件被线程占用,无法打开”
经过长时间调试,发现在红色部分占用log,至今仍未明白。启动一个exe会一直占有log?
echo ============================ >>log.txt
echo Test started at: %date% %time% >>log.txt
::Rename the folder if it's been changed
if exist "\\guinea\QA\APXDailyRegression\vmqanubat40\IcanHelp_new" (ren "\\guinea\QA\APXDailyRegression\vmqanubat40\IcanHelp_new" "IcanHelp") >>log.txt
::start app
cd "C:\dyao\Running Projects\"
<span style="background-color: rgb(255, 0, 0);"><strong>st