Sort IDM downloads by file type: categories, masks and the registry

Sort IDM downloads by file type with categories: each has its own extension list and folder. Set a folder for every category, not just the main one.
Internet Download Manager (IDM) already sorts downloads by file type. It does it through categories: each category has a name, a list of file extensions and a folder of its own, and a download whose extension is on a category's list is offered that category's folder, or saved straight into it. If IDM keeps saving to a folder you did not pick, a category's folder is almost always the reason. You set the main folder, and the category kept its own.
This post covers how IDM decides where a file goes, where that setting is stored, why editing it by hand can go wrong, and how to set up a sensible group of categories and carry it to a new PC. It ends with IDM Download Router, the studio's free, MIT-licensed tool that sets every category's folder from one screen.
How IDM picks a folder
IDM's own help page, How to use Internet Download Manager, describes the model in one sentence: "Every download category has a name, a default download directory and a list of associated file types." Its example is a Documents category with the extensions DOC PDF XLS TXT and the folder C:\Downloads\Documents.

The same page explains how a download is matched to a category: "IDM will suggest the category and the folder automatically when you download or save files that match the list of file types. If you disable save file dialogs in IDM options, IDM will place downloads to their designated categories automatically."
So the routing works in two steps:
- The file's extension is checked against each category's list of file types.
- The matching category's folder is used as the save location. IDM either suggests it in the save dialog or uses it outright if you have switched that dialog off.
A category can also be limited to particular sites. The help page describes a checkbox, "Automatically put in this category the files from the following sites only", and gives *.googlevideo.com as an example.
IDM ships with predefined categories ("like Music, Video, Programs, Documents, etc.", in the help page's words), and you can edit, delete or add to them.
"IDM ignores my download folder"
This is common enough that IDM answers it in its own FAQ. In FAQ: I set path where to save downloaded files, but IDM still places them in some other folder, the answer is: "IDM has download categories to organize your downloads. Each category has its own download path." The fix it gives is to open the download options, pick each category in turn from the drop-down and "set a path for each category".
The same answer gives the alternative: "If you do not want to use categories, just delete them." Then IDM saves everything into one folder.
That leaves you two ways to get predictable folders:
- One folder for everything. Delete the categories.
- One folder per file type. Keep the categories and give each one a folder you actually want. The usual layout is a single main folder with a subfolder per category.
The dialog has moved over the years. IDM's settings-transfer FAQ calls it "Options→Save To", and "Options→Downloads" in older versions.
Adding a category
To add one by hand, IDM's FAQ on new categories says to right-click anywhere in the categories panel of the main window, choose "Add Category", then set the category's name, its download folder and the file types it should hold.
That is quick for one category. Setting up five or nine of them, each with a long extension list, means one dialog per category.
Where categories are stored
IDM keeps its settings in the registry under HKEY_CURRENT_USER\Software\DownloadManager. IDM's own transfer FAQ names that key as the thing to export. Categories live one level down, one subkey each, under FoldersTree\<Name>. The IDM Download Router README lists the values each category key holds:

| value | type | meaning |
|---|---|---|
ID | REG_DWORD | unique category id |
mask | REG_SZ | space-separated extensions routed to this folder |
pathW | REG_NONE | UTF-16LE folder path, with a null terminator |
rememberLastPath | REG_DWORD | 0 or 1 |
forSiteOnly | REG_DWORD | 0 or 1 |
sites | REG_SZ | site filter |
The mask is the list of file types, and forSiteOnly and sites back the "from the following sites only" option above. The folder is stored as raw UTF-16 bytes, not as a readable string, so Registry Editor shows it as bytes rather than as text you can edit.
To see what your own categories hold, without changing anything, run reg query with /s, which Microsoft documents as querying "all subkeys and value names recursively":
reg query "HKCU\Software\DownloadManager\FoldersTree" /sThe masks come back as plain text. The folder paths come back as hex.
Why registry edits do not stick while IDM is running
If you edit those keys by hand while IDM is open, IDM can undo the change. The router's source spells out what it found when building this: "IDM caches categories in memory and rewrites the registry on exit, which would undo deletions and additions" (idm_folders_changer.py, lines 1159–1168).
If you edit the registry by hand, then:
- Quit IDM completely, and check it is not still running in the system tray.
- Make the change.
- Start IDM again.
A new category key also needs every value in the table above, and an ID that no other category uses. The router's README describes that set as IDM's own format.
From the studio: IDM Download Router writes new categories with every one of those values and a fresh
ID, and restarts IDM itself when you add or remove one, so the change is not undone on exit.
A sensible set of categories
The masks are what decide where each file goes. An extension that is on no category's list is not sorted by type at all, so it is worth covering the file types you actually download. Images, disc images and subtitles are easy to forget.
IDM Download Router ships nine presets. Their extension lists were compiled from Wikipedia's lists of archive, video, audio, image and document formats (README). The full lists are in the source. In outline:
| Category | Examples from its mask |
|---|---|
| Compressed | zip rar 7z tar gz xz zst cab deb rpm |
| Documents | pdf docx xlsx pptx txt csv epub md |
| Music | mp3 flac aac m4a wav opus ogg |
| Programs | exe msi msix appx bat cab |
| Video | mp4 mkv webm mov avi ts m2ts |
| Images | jpg png webp heic avif svg psd dng |
| Disk Images | iso img dmg vhd vhdx wim |
| Subtitles | srt ass ssa vtt sub sup |
| Torrents | torrent |
You can copy any of these lists into IDM's own category dialog by hand. You do not need the router to use them.
Two cautions:
- Watch for an extension in two lists. In these presets
cabsits in both Compressed and Programs, andogg,mp2,m4pandrmsit in both Music and Video. IDM does not document which category wins when two lists share an extension. If you care where.oggfiles go, keep it in one list and remove it from the other. - The Torrents category does not make IDM a torrent client. IDM's torrent FAQ says plainly that it "does not support torrents". The category only sorts the small
.torrentmetafiles you download from a website into their own folder, ready to open in a torrent client.
Backing up and moving your setup
Everything above, categories included, is under one key. That makes the backup a single command. Microsoft's reg export needs quotes around a key name with a space in it and a file ending in .reg:
reg export "HKCU\Software\DownloadManager" idm-settings.regTo restore it, quit IDM first and then use reg import:
reg import idm-settings.regIDM's transfer FAQ adds the step people forget when moving to a new PC. Note the temporary directory and every category's download folder, and copy those folders to the same paths on the new machine. Then, in the FAQ's words, IDM "will use your old settings" and you should "be able to resume unfinished downloads".
Take the export before you make large changes, too. It is the quickest way back from a mistake.
Doing it on one screen
The reason I wrote IDM Download Router is that the steps above are spread across a stack of dialogs, one category at a time. The router reads HKCU\Software\DownloadManager, including categories you added inside IDM, and lays the whole table out on one screen. Each row shows a category, the folder it has now, the folder it will have after you apply, and its extension list, which you edit by double-clicking. Nothing is written until you press Apply, and then everything is written together.
What it does when you apply, read from apply_changes():
- It sets IDM's main download folder.
- It writes each category's folder as a subfolder of the main folder, named after the category. With
D:\Downloadsas the main folder, Video goes toD:\Downloads\Videoand Disk Images toD:\Downloads\Disk Images. It creates any of those subfolders that are missing when "create subfolders if missing" is ticked, which it is by default. - New categories get every value in the table above, including a fresh
ID(source). - If you added or removed a category, it restarts IDM so the change is not undone on exit. It stops IDM with a forced
taskkill(source), so let running downloads finish or pause them before you apply.
The subfolder rule is the one limit to know about. The router does not put one category on a different drive. If you want Video on E:\ and everything else under D:\Downloads, set that one path in IDM's own options after applying. The next Apply in the router will set it back to a subfolder.
It runs on Windows 10 and 11, needs IDM installed, and is free and MIT-licensed, with the source on GitHub. The downloaded file is IDM.Download.Router.exe. The app keeps its own settings in %APPDATA%\IDM Folders Changer\config.json (the folder still carries the project's earlier name), so copy that too if you move machines. IDM is a third-party product made by Tonec, and the router is not affiliated with it.
Whether you use the router or IDM's own dialogs, the fix is the same: decide which extensions go where, give every category a folder, and remember that the category's folder beats the main one. If you want the one-screen version, IDM Download Router is a free download.
One screen for IDM's folders and categories
Puts every Internet Download Manager folder and category on one screen — reviewed as a set, applied in one action instead of nine dialogs.
MITWindows 10 / 11