B4J Question True name of system folder "Downloads"

johnmie

Active Member
Licensed User
Longtime User
Hi everyone,
I am trying to prevent B4J and B4i users from saving files to the official downloads folder (C:\<user>\Downloads under B4J), but could not find the corresponding environment variable nor another way to identify this folder in a non-English OS (in my French systems it would be "\Téléchargements"). GetDataFolder and other tricks I found in the forum always return "Downloads" at best, regardless of how I tried to tweak them.

Can anybody suggest a solution, please. Thank you in advance.
 

josejad

Expert
Licensed User
Longtime User
Maybe this post give you some clue?

 
Upvote 0

johnmie

Active Member
Licensed User
Longtime User
thanks José,
This is actually the first thing I looked at, but unfortunately it requires that I already know the name of the folder in the language of the OS.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
If I'm not wrong, the language folder name, is just an alias, but the real folder is always called "Downloads".
For example, in my system (spanish windows 11) I see "Descargas", but the real folder in the file system is "Downloads".
Anyway, wait for some other answers because I'm not really sure.
 
Upvote 0

johnmie

Active Member
Licensed User
Longtime User
You are absolutely right, replacing "Documents" in DirUserDefault with "Downloads" points indeed to the directory "Téléchargements", but it would nice if I could tell the user which folder to avoid. No big deal, problem solved, thank you.
 
Upvote 0
Top