Showing posts from July, 2007

FORFILES: Select a file tree to process a batch job like delete function

Microsoft reskit tool “forfiles” do a search in specific folder and its subfolders, can delete files with time stamp criteria.

I was using this utility when I was in Microsoft and played with the log file of various servers.

The folling command line can be used to delete 30 days old files from the path given, including subfolders:

forfiles –p[TREE_PATH] -s -m*log* -d-30 -c"cmd /c del @FILE"