Task Scheduler : How to delete files older than X days automatically - windows command prompt

Published: 05 September 2021
on channel: Newbie Computer
23,748
249

On Windows 10, you can use Command Prompt and Task Scheduler to automatically delete files older than a certain number of days to free up space and keep your files organized.

command :
ForFiles /p "C:\path\to\folder" /s /d -30 /c "cmd /c del /q @file"

you can also filter files search with /M *.docx to delete only docx files.

#taskscheduler
#windows10
#windows11
#autodelete
#commandprompt
#forfiles
#tutorial
#trick
#tips
#automation
#deletefile


Watch video Task Scheduler : How to delete files older than X days automatically - windows command prompt online without registration, duration hours minute second in high quality. This video was added by user Newbie Computer 05 September 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 23,748 once and liked it 249 people.