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?

Kevin Panko
  • 8,356
  • 19
  • 50
  • 61
Mohd Faizan Khan
  • 437
  • 1
  • 5
  • 16

2 Answers2

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:

Community
  • 1
  • 1
1

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

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

should do the trick.

Sage
  • 15,290
  • 3
  • 33
  • 38