Temporary File Remover (TFR) is a console application designed to help you regularly delete temporary files and folders on your system. It reads a list of file paths from a specified text-based paths file and deletes those files and the folders inside of them, optionally skipping confirmation prompts.
- Deletes files and folders based on a list of paths provided in a text file.
- Option to skip delete confirmation prompts.
- Displays help and version information.
- Built with .NET 10 using native command-line argument parsing.
TFR [path-file] [options]- path-file: Specify a paths file containing the list of paths to delete. If no path is provided, it will look for the file
paths.txtin the current directory.
-s, --skip-confirmation: Skip the delete confirmation prompt.-h, --help: Show help message.--version: Show version information.
# Use default paths.txt file
TFR
# Specify a custom paths file
TFR C:\path\to\your\paths-file.txt
# Skip confirmation prompt
TFR -s
# Use custom file and skip confirmation
TFR C:\path\to\your\paths-file.txt --skip-confirmationThe paths file should contain one path per line. Each path can be:
- Directory path: Deletes all files and subdirectories within the directory
- File path: Deletes a specific file
- Wildcard pattern: Deletes files matching the pattern (supports
*and?)
Lines can contain comments by starting the line with the # character.
Empty lines will be ignored.
# Delete contents of temp directories
C:\Temp
C:\Windows\Temp
# Delete specific files
C:\logs\app.log
C:\data\old_backup.zip
# Delete files matching wildcards
C:\logs\*.log
C:\temp\backup_*.zip
C:\data\test?.txt
# Comments for organization
# Group 1: System temp folders
C:\Users\YourName\AppData\Local\Temp
# Group 2: Application logs
C:\MyApp\logs\*.log
*- Matches zero or more characters?- Matches exactly one character
Examples:
C:\logs\*.log- All .log files in C:\logsC:\temp\backup_*.zip- All backup_*.zip files (backup_2024.zip, backup_old.zip, etc.)C:\data\test?.txt- Files like test1.txt, testA.txt, etc.
- Removed external dependencies: No longer requires the Cocona library, using native .NET argument parsing.
- Updated to .NET 10: Leveraging the latest .NET features and performance improvements.
- Improved command-line interface: Enhanced help and version display.
- File and wildcard support: Now supports deleting individual files and using wildcard patterns (
*.log,backup_*.zip).
- Thanks for the icon to Flaticon - Delete folder icon created by juicy_fish - Flaticon
- Alfredo Pinto Molina (aka proteo5) https://github.com/proteo5
This project is licensed under the MIT License.
Copyright 2024-2026 Alfredo Pinto Molina
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.