How to bulk delete files by last modified date on Windows 11.

If you are using Windows 11 and are looking for a way to delete files in bulk by specific time frames, such as files older than 10, 15, 8, 9 days, etc. This article will show you how to run a specific command that will allow you to target a location on your computer and delete everything older than your specified time frame.

Related: How to fix no featured app section in Microsoft Store.

Windows operating systems have a lot of features and options that people don’t use frequently because of their scary-looking nature. Anything that requires the use of the Command Prompt or PowerShell tools is usually overlooked as a viable option for most users. As a result, a lot of powerful and handy options don’t get utilized enough. A classic example of this is the bulk delete by date command which allows you to delete files from locations that are older than a user-specified date (in days).

This means that you can open the Command Prompt tool on Windows 11 and run a single command that will automatically find and delete all the files that are older than a specified amount of days from a specific folder. Although it may sound and look a little complicated it’s super easy so follow along as we guide you through the process. You can even do a test run if you like. Just create a new folder and put some content in it and run the command to that location.

How do you delete files in bulk that are older than a certain amount of days on Windows 11?

If you aren’t all that confident with Command Prompt we advise you to make a practice folder for this process. Just make a new folder and place some files in it then target that folder in the command this article will show you.

Example command

ForFiles /p "C:\PATH\TO\FOLDER" /s /d -30 /c "cmd /c del /q @file"

Edited example command

ForFiles /p "C:\Users\Jasch\Downloads\TEST BULK DELETE FOLDER" /s /d -5 /c "cmd /c del /q @file"

For the people that would like to know a little more about the command-line components below is a breakdown of what each segment does.

Comments