2. Delete temp files that are older than 1 day. Quiet mode.
DeleteFiles.exe d:\temp\*.* -r -l -f -d1 -q0
3. Delete all "thumbs.db" files on entire C: drive
DeleteFiles c:\thumbs.db -r
Try it
List files older than the median age (dry run)
Inspect every file in the samples folder, compute its age in whole days from now, then dynamically set the -dXX threshold to the median observed age and call DeleteFiles with -l (LIST MODE). The Result panel shows the per-file inspection (filename, ageDays, modified timestamp, wouldBeDeleted flag) so you can see the dynamic input; the Output panel shows DeleteFiles' own list of files it would have removed. The -l flag means no file is ever touched - this demo is safe to run repeatedly against any directory. Drop -l in real usage and the same call would actually delete the listed files.
# DeleteFiles - Help
Source: https://github.com/RickStrahl/DeleteFiles
```
West Wind DeleteFiles [Version 1.14]
DeleteFiles <filespec> -r -f -y -l -d10 -s3600
Commands:
---------
HELP || /? This help display
Options:
--------
pathSpec FilePath and File Spec. Make sure to add a filespec
-r Delete files [R]ecursively
-f Remove empty [F]olders (start folder is not deleted)
-y Delete to Rec[Y]le Bin (can be slow!)
-l Disp[L]ays items that would be deleted
-q0..2 Quiet mode: -q0 - all (default) -q1 - No file detail
-q2 - No file detail, no summary
-dXX Number of [D]ays before the current date to delete
-sXX Number of [S]econds before the current time to delete
(seconds override days)
if neither -d or -s no date filter is applied (default)
Examples:
---------
DeleteFiles c:\temp\*.* -r -f - deletes all files in temp folder recursively
and deletes empty folders
DeleteFiles *.tmp -r - delete .tmp files recursively from current folder down
DeleteFiles "c:\My Files\*.*" -r - deletes all files leaves folders
DeleteFiles c:\temp\*.* -r -f -d10 - delete files 10 days or older
DeleteFiles c:\temp\*.* -r -f -s3600 - delete files older than an hour
DeleteFiles c:\thumbs.db -r - delete thumbs.db files on entire drive
```