Created
April 18, 2015 21:22
-
-
Save macna/8e5e9fc3b4ad37ca1caf to your computer and use it in GitHub Desktop.
A Microsoft Windows batch file for deleting files in a folder based on their file extension and age (.txt files older than 30 days in this example).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forfiles.exe -p C:\<your>\<folder> -m *.txt -d -30 -c "cmd.exe /C del @path"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment