Somebody, please help me with deleting files which is created on or before specific date from a folder
ppr
(Peter Preuss)
2
@Ramakrishnan_Thiagu
welcome to the forum
for the file retrieval you can implement:
arrFilesFI = new DirectoryInfo("C:\").GetFiles().Where(Function (x) x.CreationTime.Date <= YourDateTimeVar.Date).toArray
arrFilePaths =
(from fi in new DirectoryInfo("C:").GetFiles()
Where fi.CreationTime.Date <= YourDateTimeVar.Date
Select s = fi.FullName).toArray
Also have a look here: