dos batch
@echo off setlocal rem %date%에서 모든 하이픈(-)을 지워 버림 set date2=%date:-=% rem %date2%에서 공백제거 (일부윈도우 운영체제에서 필요) set date2=%date2: =% rem %time%에서 모든 공백을 0으로 고침 (시각 부분이 zerofill된 게 아니라 그냥 right justify 되어 있어서...) set time2=%time: =0% rem %time2%의 시각 부분과 분 부분만 잘라 냄 set time3=%time2:~0,2%%time2:~3,2% cd \ cd c:\DeadLock_Alarm\ netstat -na | find "1433" /c > cnt.txt for /f "delims=" %%i in (.\cnt.txt) do ..