Delete Old Files or Folders Using Task Scheduler

Using Task Scheduler in Windows 11, you can set up a task to automatically delete old files or folders on a regular schedule. This method can be helpful for keeping your system tidy without manual intervention. Here’s how to set it up:

Step 1: Press Win + S then on the search bar type “Task Scheduler”

Step 2: Right Click on “Task Scheduler Library” then click on “New Folder”

Step 3: Enter any name you want and click OK.

Step 4: Right Click on the newly created folder then click on “Create a task”

Step 5: Enter any you want in the name field then enable the Run whether the user is logged on or not.

Step 6: Select your preferred schedule for running the task and click OK. Then, Navigate to the “Actions” tab.

Step 7: In the actions tab click on “New” then on Program/scripts field type this command “ForFiles /p “old file path”/s /d -30 /c “cmd /c del /q @file””

Replace “old file path” with your desired directory, and use -30 to represent the last modified time, as an example:

ForFiles /p “C:\Users\Saurabh\Documents\New folder” /s /d -30 /c “cmd /c del /q @file”

Step 9: Click Ok. Then, Navigate to Settings tab and check the following checkboxes:

  • If the task fails, restart every.
  • Run tasks as soon as possible after a scheduled start is missed.

Using Task Scheduler is a great way to automate the deletion of old files or folders in Windows 11, helping you maintain a clean and efficient system.

How to Automatically Delete Old Files in Windows 11?

Automatically deleting old files in Windows 11 can help you manage your storage space more efficiently and keep your computer running smoothly. Over time, files can accumulate and take up valuable storage space, especially large or unneeded files such as downloads, temporary files, or old backups. By setting up automatic file deletion, you can free up space on your hard drive and improve your system’s performance.

Methods to Automatically Delete old files in Windows 11

  • Method 1: Auto-Delete Old Files or Folders Using Storage Sense
  • Method 2: Delete Old Files or Folders Using Command Prompt
  • Method 3: Delete Old Files or Folders Using Task Scheduler
  • Method 4: Delete Old Files or Folders Using Microsoft PC Manager

In this guide, we’ll show you how to set up automatic file deletion in Windows 11 using built-in tools and settings. With these easy steps, you can keep your storage clean and organized without the hassle of manually deleting files. Let’s get started!

Similar Reads

Method 1: Auto-Delete Old Files or Folders Using Storage Sense

The Settings’s Storage Sense feature automatically removes files or folders when storage space is running low....

Method 2: Delete Old Files or Folders Using Command Prompt

You can use Command Prompt to delete old files or folders in Windows 11. This method is useful if you prefer to work with text commands. Follow these simple steps:...

Method 3: Delete Old Files or Folders Using Task Scheduler

Using Task Scheduler in Windows 11, you can set up a task to automatically delete old files or folders on a regular schedule. This method can be helpful for keeping your system tidy without manual intervention. Here’s how to set it up:...

Method 4: Delete Old Files or Folders Using Microsoft PC Manager

Using Microsoft PC Manager is an easy and convenient way to automatically delete old files or folders in Windows 11. This tool offers a straightforward way to manage and optimize your system’s storage. Here’s how you can use it:...

Conclusion

In conclusion, we have shown four methods for automatically deleting old files or folders on Windows 11. These methods involve utilizing Storage Sense, Command Prompt, Task Scheduler, and Microsoft PC Manager. These methods allow you to enhance your computer’s performance, free up storage space, and protect your privacy....

How to Automatically Delete Old Files in Windows 11?- FAQs

How do I mass delete files in Windows 11?...