[Solved] Deleting files base on time creation [closed]


As it is clear in the example from where you have taken the code that fileList is a array of FileInfo. you have to declare and fill that array before code.:

DirectoryInfo Dir = new DirectoryInfo(DirectoryPath);
FileInfo[] FileList = Dir.GetFiles("*.*", SearchOption.AllDirectories);

solved Deleting files base on time creation [closed]