@echo off
rem TMstatus.bat set zombie vars to full or partial task name to test remove from Task Manager
Demonstrates (a) Timestamps (b) FOR parsing of delimited fields and (c) IF logical comparisons NOTE: Replace 'Zombie1' and 'Zombie2', with your choice from command line TASKLIST
setlocal set xtime=%time::=% :randomfile TASKLIST /NH /FI "IMAGENAME eq %zombie1%*" >> %randfile% for /f "tokens=3" %%f in ('find /i /c "%zombie1%" %randfile%') do set whatcount1=%%f echo %timestamp% %0 %hasargument% count of %zombie1% is: %whatcount1% >> %outputfile% ECHO FOR MORE DETAILS try command line: TASKLIST /M /FI "IMAGENAME eq SubSys*" if "%1"=="" echo end of %0 |
Category: Demo
Batch: Clean Desktop
@echo off
REM moves graphic files to "Screenshots", other files to folder "_Desktop<timestamp>
REM demonstrates current date/time stamps AND "for (each) loops setlocal :set n endlocal |