The default downloads folder in Windows 7 is c:\users\username\downloads for Chrome. 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 the specific folder.
Is there a way of finding this out using C#? I mean I don't want to visit the chrome settings and fetch the folder path from there.
The default locations for Chrome settings are here. I actually found mine to be under 'C:\Users[UserName]\AppData\Local\Google\Chrome\User Data\Default' for Chrome 20.0.1132.47.
If you open the Preferences file, you can parse the JSON to get the download folder:
"download": {
"default_directory": "C:\\Users\\[UserName]\\Downloads",
"directory_upgrade": true,
"extensions_to_open": ""
}
If there is no default_directory
value, then the directory C:\Users\[UserName]\Downloads is being used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With