Hi Team,
I am using the below code to delete files which are 7 days old and working without any issues.
Is there any way to identify this much no of files deleted and get the file name that this file is deleted.
Existing working code
array.ForEach(Directory.GetFiles(“Path”).where(Function(x) New FileInfo(x).LastTime.Date<=Today.Date.AddDays(-7)).ToArray.sub(x) file.Delete(x))