0

I have a date and time when file was created in a system and I am trying to get the filename with the help of date and time. It is possible or not, if it is possible then anyone please tell me. How can I get a filename using data and time in c#.

Note: Date and time means when file was created in a system.

kamlesh jha
  • 361
  • 2
  • 8
  • you can use FileInfo.CreationTime https://stackoverflow.com/questions/7861886/how-to-get-file-properties – fmansour Nov 17 '21 at 11:46
  • what did you try yourself? Where specifically do you need help? Where is your code? – MakePeaceGreatAgain Nov 17 '21 at 11:59
  • You can do that by combining the answers to these three questions: [Getting a list of logical drives](https://stackoverflow.com/questions/781905/getting-a-list-of-logical-drives), [How to recursively list all the files in a directory in C#?](https://stackoverflow.com/questions/929276/how-to-recursively-list-all-the-files-in-a-directory-in-c) and [How to get File Created Date and Modified Date](https://stackoverflow.com/questions/23243336/). Or if you already know the drive or a part of the path, you can skip directly to the second one. Where exactly are you stuck? – CodeCaster Nov 17 '21 at 14:12

0 Answers0