Feb
3
FORFILES.EXE has changed my life!
NOTE: The operating system that I ran these commands on was Windows Server 2003 SP2 32bit.
Create a .CSV list of .EML files in the current directory that are over 30 days old:
FORFILES /M *.eml /D -30 /C “cmd /c echo @fname,@fsize,@fdate » URI.CSV”
Create spamlist.CSV list in F:\TEMP of all of the .EML files in the current directory and all sub-directories that are over 30 days old:
FORFILES /M *.eml /S /D -30 /C “cmd /c echo @fname,@fsize,@fdate » F:\TEMP\spamlist.CSV”
Deletes all .EML files over 30 days old in current directory and sub-directories:
FORFILES /M *.eml /S /D -30 /C “cmd /c del /q @path”