Hello, a similar question was asked and answered in this forum post.
The best answer was the following:
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.
Let me know if that helps!