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;
相關文章
相關標籤/搜索