How to Download Files to Specific Folders Based on their File Type in Chrome

Abhishek Macwan

We download videos, songs,  images, torrents and what not? And, everything gets downloaded to ONE folder – Downloads. It’s one of the most disorganized and messed up folder on your PC. You must have had a bad time organizing these downloaded files, copy-pasting them to their appropriate folder. So, here in this guide, I’ll show you how you can automatically download songs to your Songs folder and videos to your Videos folder.

download-file-to-specific-folder
Route file downloads to specific folder on your Hard Drive | Shutterstock

You will be able to download files to any specified folder of your choice based on the file type that you are downloading. So, let’s dig in and see how you can do it. And yes, this is specifically for Google Chrome.

Organize Your Downloads Folder

You can organize the downloads folder on your PC using one simple Chrome extension – Download Router. It lets you save your files in a specific folder inside the downloads folder. But you can specify a folder other than downloads folder, there’s a workaround for that. It’s explained in the next section. In this section let’s see how you can use this extension to organize the Downloads folder.

Right after you download and install it, you’ll be taken to the options page where you need to set the download routing rules for your downloads. Now, there are 3 ways you can set these rules. First is based on the File Type. The extension will download a specific file type (eg: mp3) to Music folder. Second is based on Referrer. Here, referrer means the website (eg: facebook.com). So, anything downloaded from facebook.com will be placed in your specified Facebook folder. And last is based on File Name. The extension will check the file name and see if it matches a name in the rule that you set. If it does then it will be placed in the folder set by you.

Now, let’s see how you can set these rules. Let’s first set the rule based on Filetype. By default, rules for jpeg images and torrent applications will be set. Here, I’ll add two more rules. For mp4 videos and GIF images. Before you set the rule, one thing you need to know that here you’re not going to set file extension (eg: .mp4). But, you are going to set a MIME type for that particular file. Here’s a complete list of MIME Types for all type of files.

rule-based-on-filetype

Here I’ve added MIME for mp4 videos (video/mp4) and GIF images (image/gif) along with the corresponding destination folder. Now, this destination folder will be inside the Downloads folder. You can also create a hierarchy of folders as I did here for GIFs. Don’t forget to add a “/” after the folder name if it is the root folder.

Don’t Panic! The folders will be created after you download the files. So, don’t go checking around the web why it didn’t create the destination folder right after the installation.

Here’s an example of download rules based on Referrer. I’ve used facebook.com

rule-based-on-referrer

Here’s I’ve set source domain for facebook scontent.fdel1-1.fna.fbcdn.net. Because Facebook images and videos don’t get downloaded from facebook.com but from a CDN (Content Distribution Network). So, you need to set the CDN URL and not the actual source domain. This only will be the case for big websites like Facebook, Twitter and others. To check the URL, just right-click on an image and open it in a new tab. You’ll get the source URL.

Another option is to set Global referrer folder. Checking this option will download the file to the folder that has the same name as the source URL. Next is rules based on file name. This too is simple. You just need to add a single keyword that should match a file name and it will be placed in the destination folder. You can set advanced keywords as shown below.

rule-based-on-filename

Here, I’ve added | between keyword that depicts or. Any of the keywords matches in the file name then it will be placed in that destination folder. Also, the keywords are NOT case-sensitive.

Next, you need to set which rule type will execute first. This is important because if you set a file type rule for jpeg images that it should be downloaded to images/jpeg folder but it gets downloaded to batmanVsuperman folder. Becuase, the image you downloaded had the keyword batman thatmatched with file name rule. So, you need to set which rule type will execute first according to your liking.

rule-executition heirarchy

Next, let’s see how you can download files outside the downloads folder.

Note: If you are using a download manager extension other than Chrome’s native one then it might cause errors. So, you’ll have to delete that particular download manager.

Route Your Downloads to Your Specified Folder

Due to security concerns, Chrome API doesn’t let developers to allow their users to download files outside Downloads folder. So, there’s a workaround on how you can achieve this. We’ll use Symbolic Links or Symlinks to direct a folder inside downloads folder to another folder on your hard drive.

symbolic-link

Open Command Prompt as Admin and add the following command.

mlink /D “Target Link” “Desired folder location”

Replace Target Link with the Downloads folder address and Desired Location with the folder on the other drive where you want it to appear. The example is in the above screenshot.

Here, you’re creating a soft symbolic link. So, you’re actually creating a shortcut to your desired folder. It will redirect you to your desired folder on the hard drive. You can create a hard symbolic link, which means it will actually appear as if the file is located in that folder. More on that here.

Something Simpler?

If you ain’t that geeky then you should try this extension. It works the same but in more simple manner. Let us know if you have any other simpler ideas for achieving this specific task.

ALSO SEE: How to Bulk Download Images in Chrome

Also See
#chrome #Download

Join the newsletter

He's a PC Geek, Android Nerd, Programmer and a Thinker. He likes reading inspiring stories and to learn new scriptures. In his spare time, you'll find him looking for different ways to automate his Tech. He also writes about Android and Windows Customization Tips on his own blog All Tech Flix.