windows batch 2016-05-21 批次檔中迴圈的錯誤偵測及跳出12345setlocal enabledelayedexpansionfor %%f in (C:\Windows\*) do ( runsomeapplication.exe /with "parameters" if !errorlevel! neq 0 exit /b !errorlevel!) 改檔名串接日期時間格式1234567echo %date%echo %date:~0,4%%date:~5,2%%date:~8,2%echo %time%echo %time:~0,5%echo %time:~0,2%%time:~2,2%echo %time:~0,2%%time:~3,2%ren snapshot.csv snapshot.%date:~0,4%%date:~5,2%%date:~8,2%.csv < food cassandra on ubuntu >