C#如何获取系统downloads和documents路径

https://stackoverflow.com/questions/7672774/how-do-i-determine-the-windows-download-folder-pathwindows

若是你经过文件夹的location属性,移动了文件夹。post

好比以前在%userProfile%\downloads,被移动到了c:\workspace\clu\downloadsspa

You can use the Windows API Code Pack for Microsoft .NET Framework.code

Reference: Microsoft.WindowsAPICodePack.Shell.dllget

Need the following namespace:string

using Microsoft.WindowsAPICodePack.Shell;

Simple usage:io

string downloadsPath = KnownFolders.Downloads.Path;
相关文章
相关标签/搜索