UWP - Get path to user download folder

I have been looking for a little time and do not find much help through MSDN resources and others.

My difficulty is simple: my application needs a base directory in the Downloads folder. I know the DownloadsFolder class but this does not fit my needs at the moment.

How to get current user Download folder path in universal Windows application?

+1
c # uwp windows-10-universal
source share
2 answers

That's what you need?

 string localfolder = ApplicationData.Current.LocalFolder.Path; var array = localfolder.Split('\\'); var username = array[2]; string downloads = @"C:\Users\" + username + @"\Downloads"; 

This will lead to

C: \ Users \ username \ Downloads

+1
source share
 System.Environment.ExpandEnvironmentVariables("%userprofile%/downloads/") 
0
source share

All Articles