gpt4 book ai didi

c# - 如何在 Windows 7 中获取最近文档列表?

转载 作者:行者123 更新时间:2023-11-30 19:03:27 29 4
gpt4 key购买 nike

在我的应用程序中,我想获取 Windows 7 中最近使用过的文档的所有路径(适用于所有类型的文档),我使用的是 C#,那么有什么方法可以做到这一点吗?请帮帮我? .

谢谢

最佳答案

使用 Environment.SpecialFolder.Recent:

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

关于c# - 如何在 Windows 7 中获取最近文档列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4569862/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com