i am trying to create batch file that will delete all files in particular folder mention in batch file. files tha are older then one day deleted from that folder.
My batch file(Daily Files Cleanup) is,
/p "D:\Temporary\PDF" /s /m *.* /c "cmd /c Del @path" /d -1
I took help from this article,
https://www.howtogeek.com/201930/how-to-automatically-delete-files-in-your-download-folder-on-a-schedule/
and Task Scheduler changes to work on daily basis also mention time according to that like 5 minutes after current time in my country
From Events i get result for this batch file,
Task Scheduler successfully finished "{5fb8353e-0136-4110-84bd-83831adadc41}" instance of the "\Daily Files Cleanup"
But all files are still in PDF folder
Hopes for your suggestion i am using win 10
EDITED:
forfiles /p "D:\Temporary\PDF" /s /m *.* /D -1 /C "cmd /c del @path"
This script is working good but deleting all file i want to delete that are created one day ago example today is 19 March files created on 18 March will be deleted not older then that