recursively scan all the directories under the root directory and find only the newest file from each folder
<p>that's what i try but it return only the newest file from only the top directories under the root</p>

<pre><code>if(Directory.Exists("YourPath"))
foreach (string _tempFiles in Directory.GetDirectories("YourPath")
                       .Select(directory =&gt; Directory.GetFiles(directory, "*.*", SearchOption.AllDirectories)
                       .OrderByDescending(File.GetLastWriteTime)
                       .FirstOrDefault()))
</code></pre>
