This post mainly shows you how to automatically delete files on Windows 10/11 via built-in utilities on the computer. You just need to follow the steps offered by MiniTool Partition Wizard to complete the operation.

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.

MiniTool Partition Wizard FreeClick to Download100%Clean & Safe

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.

Note:
You can’t directly reverse the action by using the ForFiles command to stop it from automatically deleting files. Instead, you can move the files to a different location to reverse the operation.

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.

Tips:
The "C:\path\to\folder" and /d -30 refer to the folder path from where you would like to delete files and the specific time for which you want to delete files. You can replace them with your specific settings.

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.
Fix and Avoid Files Copied to a USB Drive Disappear
Fix and Avoid Files Copied to a USB Drive Disappear

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.

Read More

#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.

turn on Storage Sense

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.

configure settings

Step 5: Tap on the Clean now button to save the changes. Then your computer will automatically delete files on Windows 10/11.

6 Effective and Reliable Methods to Delete Files Permanently
6 Effective and Reliable Methods to Delete Files Permanently

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.

Read More

#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.

open Microsoft PC Manager

Step 2: In the pop-up window, check the user license and privacy agreements and click Install.

install Microsoft PC Manager

Step 3: After installation, click Launch Now to continue.

click Launch Now

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.

enable Smart boost
Top 5 Fixes for DaVinci Resolve GPU Memory Full
Top 5 Fixes for DaVinci Resolve GPU Memory Full

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.

Read More

#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.

  • linkedin
  • reddit