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

后端 未结 2 1854
野趣味
野趣味 2021-01-21 12:35

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? .

<
2条回答
  •  耶瑟儿~
    2021-01-21 12:58

    Use Environment.SpecialFolder.Recent:

    string path = Environment.GetFolderPath(Environment.SpecialFolder.Recent);
    var files = Directory.EnumerateFiles(path);
    

提交回复
热议问题