LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to ger current user's Downloads folder

Solved!
Go to solution

hi,

I'm looking for a simple way to get the path to current user's Windows Downloads folder.

The Get System Directory has only Documents and Desktop no Downloads...

0 Kudos
Message 1 of 9
(3,448 Views)

I believe that the native support for Windows Environment Variables isn't correct, so I use them through SystemExec, instead.  Using the environment variables, I believe you can concatenate a path to the download folder.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 9
(3,444 Views)

This seems to work just fine on my Windows 10 computer.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 9
(3,410 Views)

if you use English yes, I'm working in company with some PCs in German so the name will be language dependent. That's the reason why you get user's documents with Get System Directory not by hardcoded string...

0 Kudos
Message 4 of 9
(3,381 Views)
Solution
Accepted by topic author tcie

you can get it thru registry:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\{374DE290-123F-4565-9164-39C4925E467B}

I know, the name of the key sound funny but it can be universal but not 100%...

tcie_0-1603388660876.png

 

0 Kudos
Message 5 of 9
(3,375 Views)

@crossrulz wrote:

This seems to work just fine on my Windows 10 computer.


I believe two choices are swapped.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 9
(3,360 Views)

@billko wrote:

@crossrulz wrote:

This seems to work just fine on my Windows 10 computer.


I believe two choices are swapped.


I don't understand Bill's comment.  I use a method similar to crossrulz's, but I start at User Home, so it's slightly simpler:

 

Downloads Path.png

Bob Schor 

0 Kudos
Message 7 of 9
(3,291 Views)

still it works only if the target user is configured in English, use registry key

0 Kudos
Message 8 of 9
(3,280 Views)

@Bob_Schor wrote:

@billko wrote:

@crossrulz wrote:

This seems to work just fine on my Windows 10 computer.


I believe two choices are swapped.


I don't understand Bill's comment.  I use a method similar to crossrulz's, but I start at User Home, so it's slightly simpler:

 

Downloads Path.png

Bob Schor 


Apparently I don't understand it, either, because I looked through all the choices and couldn't figure out what i was talking about!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 9
(3,265 Views)