1

How does one access the list of recently opened files in Windows 8 using Java?

In other words, what is the path for the "recent document" folder in Windows, which could be passed as argument in constructor of file class to access the files in that folder?

4
  • Probably no such path exists, but I am sure there has to be some other way to access the recently opened files. Commented Oct 12, 2013 at 20:49
  • so what is that way, for what u r so sure? Commented Oct 12, 2013 at 20:51
  • it probably is a native api in windows Commented Oct 12, 2013 at 20:54
  • how to use that into my program? i want to make a program which takes a record of all the PDF files opened recently. Commented Oct 12, 2013 at 20:58

2 Answers 2

1

Try to look here -

  • MS Office Docs - C:\Users\YouAccount\AppData\Roaming\Microsoft\Office\Recent
  • Opened by Explorer - C:\Users\YouAccount\AppData\Roaming\Microsoft\Windows\Recent

To get the actual path by link - see these topics:

Sign up to request clarification or add additional context in comments.

Comments

1

It is always inside %USERPROFILE%\Recent, so using System.env(argument)

String userProfileDir = System.getenv("USERPROFILE")+"\\Recent"; 

should do the trick.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.