wood burning stoves 2.0*
The moose likes General Computing and the fly likes Windows registry key for recent documents Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Windows registry key for recent documents" Watch "Windows registry key for recent documents" New topic
Author

Windows registry key for recent documents

drashti Bhuta
Greenhorn

Joined: Mar 23, 2013
Posts: 1
hey wat is the registry key to use if i want to get access to files of recent document folder in windows xp ??
HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RecentDocs-this is the registry key probably but not working
i am new to java n i want to get access to all files in "recent doment"folder please provide some solution
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Hello and welcome to Javaranch

What version of Window's are you using?

Please use a separate thread for your questions, posting to a two year old thread with a different topic is less likely to be helpful.
I have done this for you for this topic.


SCJP, SCWCD.
|Asking Good Questions|
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3611
    
  60

In Windows, there is a "Recent" folder in the user profile directory. It contains a list of recent files in the form of shortcuts (.lnk files). Such a folder exists since Windows 2000 or so, I believe. This might perhaps fit your needs -- you just need to locate the user profile folder, and perhaps get current name of the "Recent" folder, as it might be localized in non-English versions of Windows. There should be Windows API functions that provide both of these information.

The registry key you're referring to seems to contain a list of recent files sorted by extension, and I guess they're used by Windows taskbar to provide list of recently opened files for individual applications (for example, when I right-click the MS Word icon pinned to my taskbar, I get a list of recently opened files). I'd say it was introduced in Windows Vista. The values are stored in binary format, though, so it is not as simple as just reading them -- you'd need to decode the binary format.

I guess there might be a Windows API function that would give you access to these information, if there is, it might be easier to use than decoding the registry entries.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Windows registry key for recent documents