I just started to develop chrome extensions. I want to create an extension in order to change the download folder for a specific download.
Can I do such thing? if not,How can I change the default download folder before the downloads begin and then return it to the original value after the download ends?
From File Explorer, right-click the Downloads folder and select Properties > Location, then type the desired location into the text field and select OK. Be aware that when you set the new location, you'll still need to designate the Downloads folder.
You can't change the base Downloads folder - this setting is not anyhow exposed.
However, with chrome.downloads
API you can put files in a subfolder of the user's Downloads folder.
You can either initiate the download yourself with chrome.downloads.download
or use chrome.downloads.onDeterminingFilename
request to intercept downloads from other sources.
You need to provide a relative path as a suggested name, e.g. "special/filename"
to save into a subfolder special
inside the Downloads folder.
Not an answer to the question but there is a Chrome Extension that can do it.
RegExp
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