The default downloads folder in Windows 7 is c:\users\username\downloads for Firefox. But default downloads folder can be set to another folder through settings. I need to find out which folder is the downloads folder. So if I set the downloads folder to c:\dd, then I need to find out that specific folder.
Is there a way of finding this out using C#?
The default downloads folder c:\users\username\downloads is not just for Firefox, but it is uses throughout Windows.
So if you change the downloads folder in Firefox, it will be specific to Firefox.
My guess is the setting is saved somewhere in the registry. So find the right registry key, read it with your C# code and you should be able to use it!
— edit —
Little investigation learns that Firefox saves all configuration in a profile folder.
In
C:\Users\user\AppData\Roaming\Mozilla\Firefoxthere is a fileprofiles.inithere you can get the profile folder associated with the current user. From there you can go into the folder and get the configured download folder from the right file. Probably prefs.js?— edit 2 —
prefs.js seems right, when you have configured another folder than the default download folder there should be a line similair to
user_pref("browser.download.dir", "C:\\Users\\user\\Desktop");