Mos Def (I loved "Oh no!"),
Use the DirectoryInfo class. With that, you can get all the files in
the folder through a call to the GetFiles method. This will return an array
of FileInfo instances, which you can check the LastWriteTime property of to
determine the time the file was last modified. From there you can search
the array and get the last file modified (by looping through and doing a
simple comparison).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
<mo****************@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
How can I use C# to find the most recently modified file in a folder?
As you can probably guess, I am just a beginner, so any help would be
appreciated.
Thanks!