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"

Comments

Anonymous said…
Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Celular, I hope you enjoy. The address is http://telefone-celular-brasil.blogspot.com. A hug.

Popular posts from this blog

Solved Account lockout issue

My Wintel Infrastructure Transitioning Experience

Windows 2008 RDC / RDP: "Because of an error in data encryption, the session will end"