Batch script to delete file older than 30 day
Solved/Closed
sd6340
Posts
1
Registration date
Thursday February 26, 2009
Status
Member
Last seen
February 27, 2009
-
Updated on Jul 19, 2017 at 06:03 AM
eie - Apr 18, 2019 at 12:20 AM
eie - Apr 18, 2019 at 12:20 AM
Related:
- Batch file to delete files older than 1 hour
- Batch script to delete files older than 30 days in windows server - Best answers
- Batch script to delete files in a folder older than 30 days - Best answers
- Fnaf 1 download pc - Download - Horror
- Gta 1 download - Download - Action and adventure
- Whatsapp is temporarily unavailable please try again in 1 hour ✓ - WhatsApp Forum
- Illustrator could partially read this file ✓ - Office Software Forum
- Forfiles move files older than - Guide
12 responses
Try the following command to automatically delete files at the root of a directory. This command can be saved in a .bat file and scheduled with scheduled tasks.
forfiles /p "PATH" /s /d -30 /c "cmd /c del @file : date >= 30 days >NUL"
Change "PATH" with the path where you want the files to be deleted. If there are no spaces in the path you dont need the "-symbol.
forfiles /p "PATH" /s /d -30 /c "cmd /c del @file : date >= 30 days >NUL"
Change "PATH" with the path where you want the files to be deleted. If there are no spaces in the path you dont need the "-symbol.
Jun 23, 2010 at 04:44 AM
Jun 30, 2010 at 01:05 AM