Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get a list of recent documents in windows 7?

Tags:

c#

windows-7

in my app i want to get all paths of recent used document in windows 7 (for all types of documents) , i am using c# ,so is there any method to do that ? help me please? .

thanks

like image 390
Radi Avatar asked Jan 26 '26 02:01

Radi


2 Answers

Use Environment.SpecialFolder.Recent:

string path = Environment.GetFolderPath(Environment.SpecialFolder.Recent);
var files = Directory.EnumerateFiles(path);
like image 129
as-cii Avatar answered Jan 28 '26 17:01

as-cii


This kind of data is stored in the registry. A Google search led me to the following:

Description: Recently opened files from Windows Explorer Location: C:\Users\\AppData\Roaming\Microsoft\Windows\Recent

Description: Recently Opened Office Docs Location: C:\Users\\AppData\Roaming\Microsoft\Office\Recent

(from: http://www.irongeek.com/i.php?page=security/windows-forensics-registry-and-file-system-spots)

like image 24
yurib Avatar answered Jan 28 '26 15:01

yurib



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!