Change download folder based on website from which I download

applescriptchrome-extensionsdata transfergoogle-chrome

Is it possible to change Downloads folder in Google Chrome (or any other browser) on the fly, based on the website from which I download?

Example: I start downloading on facebook.com and it downloads the file in ~/Downloads/Facebook. If I start the download from stackoverflow.com than the file is downloaded into ~/Downloads/Stackoverflow.

How can I achieve this? I imagine it would be possible to write a Stay Open AppleScript application that starts at computer startup and than continuously check domain name of my current tab. Not sure how I would change downloads folder on the fly though…

Best Answer

You could write a folder action script which would parse your downloaded files metadata and move them into folders based on kMDItemWhereFroms metadata attribute value.

Or just use Downloads Router Chrome Extension with predefined location rules.