or if server is down 4 3days or close to that but u werent at ur pc when it was up
Again, that's not a working code, it was a example of how you can use DateTime and GetLastWriteTime, it all was just a example. Rest of the code is just to make it all understandable, not working.Quote:
OMG DUDE!
you search a string in another string(thats what normaly C# reads-.-')Code:foreach (string acc in "C:\\Accounts\\") { if (DateTime.Now >= System.IO.File.GetLastWriteTime("C:\\Accounts\\" + acc).AddDays(3)) { System.IO.File.Delete("C:\\Accounts\\" + acc); } }
How do you expect people to learn if you give em shit?Code:String Path = "C:\\Accounts\\"; foreach (string acc in System.IO.Directory.GetFiles(Path)) { if (DateTime.Now >= System.IO.File.GetLastWriteTime(Path + acc).AddDays(3)) { System.IO.File.Delete(Path + acc); } }