A 10 seconds search...
https://www.google.com/search?q=windows+delete+files+older+than+x+day...brought me here:
ForFiles /p "C:\Automic\Automic\temp\test" /s /d -30 /c "cmd /c del @file"
------------------------------
----------------------------------------------------------------
Automic AE Consultant and Trainer since 2000
----------------------------------------------------------------
------------------------------
Original Message:
Sent: Jul 19, 2022 05:16 PM
From: Shravan shetty
Subject: Deleting old files using scripting
Hi All,
we have a requirement on deleting some old files (.TXT) from the agent(Windows) by running some jobs. we used to do this manually but now we need a job that can be executed every month and delete these old files.
Has anyone done it before? Can anyone provide us the script for this?
Regards,
Shravan Shetty