As you know, files would pile up after you use the computer for some time. Then your PC will slow down and even trigger some confusing errors. Hence, you’d better clean up your PC regularly. MiniTool Partition Wizard, a free PC cleaner, can help you check disk space usage and free up space by deleting unimportant but space-consuming files or folders.
You can download and install it on your computer and then utilize it to optimize your PC. If you don’t want to delete files by yourself, you can automatically delete files on Windows by using the methods in this post.
#1: Automatically Delete Files on Windows via Command Prompt
How to automatically delete old files in Windows 11/10? A simple way to do that is to run the ForFiles command in Command Prompt. It’s worth noting that the ForFiles command enables you to delete files older than a certain number of days on the computer.
Step 1: Open the Search box by pressing the Windows and S keys simultaneously.
Step 2: Type cmd in the Search box and then click Run as administrator under the searched Command Prompt App.
Step 3: In the elevated Command Prompt window, type the command below and press Enter to automatically delete files that you haven’t modified in 30 days.
ForFiles /p “C:\path\to\folder”/s /d -30 /c “cmd /c del /q @file”
The meanings behind the corresponding parameters in the command. To get more details about the command, run “ForFiles /?” in Command Prompt (without quotes).
- /p: tells the ForFiles where to begin looking for files.
- /s: makes the command search in subfolders too.
- /d: specifies the last modified date for a file.
- /c: Instruct the ForFiles to do something with the files. It’s usually ‘cmd /c del @file.’
- /q: won’t ask for your confirmation to delete files.
How to recover disappeared USB copied files? Here’s a full tutorial for you. Besides, you can avoid this issue occurring again with the guide.
#2: Automatically Delete Files on Windows via Settings
In this section, you can learn how to automatically delete files on Windows 10 and 11 via Settings respectively.
On Windows 11
Step 1: Press the Windows + I key to open Settings and then click System > Storage.
Step 2: Toggle on the Storage Sense option.
Step 3: Make a series of configurations on the window.
- Tick the Keep Windows running smoothly by automatically cleaning up temporary system and app files option.
- Turn on Automatic User content cleanup.
- Choose During low free disk space (default) under Run Storage Sense.
- Pick 30 days (default) under Delete files in my recycle bin.
- Select Never (default) under Delete file in my Downloads folder.
Step 4: Finally, click Run Storage Sense now.
On Windows 10
Step 1: Open Settings and click System.
Step 2: Click Storage in the left panel and then turn on the Storage Sense feature.
Step 3: If you want to make adjustments, click the Configure Storage Sense or run it now link.
Step 4: As shown in the picture below, configure the following settings.
Step 5: Tap on the Clean now button to save the changes. Then your computer will automatically delete files on Windows 10/11.
How to permanently delete files is often asked by people who would like to clear the trace of private files. Several methods are talked about in this post.
#3: Automatically Delete Files on Windows via Microsoft PC Manager
Introduced for Windows 10 and 11 in 2022, Microsoft PC Manager enables you to clean temporary files and manage memory usage effectively. Here’s the guide on how to automatically delete files on Windows 10/11 through Microsoft PC Manager.
Step 1: Type Microsoft PC Manager in the search box and then click Open under the searched app.
Step 2: In the pop-up window, check the user license and privacy agreements and click Install.
Step 3: After installation, click Launch Now to continue.
Step 4: Click on the gear icon and then enable Smart boost. Alternatively, directly click the Boost button in the home menu to automatically delete files on Windows.
If you are bothered by the DaVinci Resolve GPU memory full issue, pay attention to the fixes offered in this post. Then try them to fix it.
#4: Automatically Delete Files on Windows via Third-Party Tools
In addition to the above Windows embedded utilities, third-party programs like Remove Old Files, Delete Files Older Than, SubDirectory Cleanup, Delete After Days, and other similar tools can also help you automatically delete files on Windows 11/10. Download one of them from its official website and install it by running the setup file. Then follow the pop-up instructions to schedule automatic file deletion tasks.
How to automatically delete old files in Windows 11/10? This post collects 4 methods to do that.