Nice little command line utility for handling recursive/mass file deletes
- Set base search directory
- Execute purge command/options
Purge command options: filematch [foldermatch] [ignorematch] [olderThan] [newerThan]
Examples:
Just delete all png files
*.png
Delete all png files in directories ending in 'to_delete'
*.png *to_delete
Delete png files in a directories ending in 'to_delete', skip files ending in 'keep.png' and delete files older than 2024-01-01 and newer than 2023-12-01
*.png *to_delete *keep.png 2024-01-01 2023-12-01
In command prompt/batch file execute:
FilePurge C:\Base\Folder\Path *.png *to_delete *keep.png 2024-01-01 2023-12-01
Honorable mentions to this dude for the Wildcard string matching function, saved some time. Thanks, nerd ;)
Nifty file and directory enumeration derived with thanks from https://gist.github.com/smith-neil/9403767