The simplest downloads folder organizer Linux service.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
altf_four 2f1ea37945
Update for v1.3.0
3 years ago
.github/workflows Fix build.yml 3 years ago
.vscode Add all() implementation 3 years ago
scripts Fix rpm postinst 3 years ago
src Add all() implementation 3 years ago
.clang-format Basic Infrastructure 3 years ago
.gitignore Add build directory exceptions. 3 years ago
CMakeLists.txt Bump version to 1.3.0 3 years ago
Dockerfile Re-arrange project structure 3 years ago
LICENSE Initial commit 3 years ago Update for v1.3.0 3 years ago Add codecov support 3 years ago Fix buildDocker exit codes 3 years ago Fix buildDocker exit codes 3 years ago Fix buildDocker exit codes 3 years ago Add codecov support 3 years ago now removes buildRelease 3 years ago



The goal of the project is to make the simplest downloads folder organizer that is configured by code making it so small that the whole thing fits in one file! Eliminating the need to manually organize or clean up your downloads folder!

Organizing your current download directory

To organize your current downloads directory, run after installation:

$ ./fixmydl all

No return means success. Note: that this completely cleans your downloads directory.


Their are multiple ways you can install it. Grab your distro's package from the release section and install it! Or wait for the project to get into your distro repositories (hopefully).

Compiling from Source

Using docker is the recommended way, make sure you have the correct permissions to use docker.

$ ./ (For debbuggable binary and installers)
$ ./ (For releasable binary and installers)
$ ./ (For extracting installers into $(PROJECT)/artifacts)

In Linux with a ready C development environment, run:

$ ./ (For debuggable binary)
$ ./ (For release binary)

The binary is outputted into $(PROJECT)/bin Refer to this section for setting up the application to run on login.

Technical Overview


The program runs in the background, watching the downloads folder with inotify and copies any new files detected, based on extension of the file, to documents folder. All folders are by default sent to documents/prefix/misc. The projects applies to XDG File directory specification. By default, the prefix is orgdl.

Starting up the application

To make fixmydl run when you login run:

$ echo 'fixmydl' >> ~/.profile


There are multiple configuration options present.

Extension ignore list

In file main.c, adding values to element extension_ignore_list will make sure that the application doesn't organize these extensions. For example, by default element: crdownloads is added to ignore temp files that chromium/Chrome uses while downloading content.

/* Example addition */
static const int IGNORE_LIST_SIZE = 2; /* MAKE SURE TO UPDATE THIS */
static const char *extension_ignore_list[] = { "crdownload", "tmp" }; /* Don't add dot */


  • Make sure you update IGNORE_LIST_SIZE
  • Make sure you don't add dot for the extension_ignore_list

Prefix Directory

This is the name or sub-path to where the categories should be placed in the documents directory. By default, it is set to orgdl. Ex: .txt files should be placed into $HOME/$DOCS/orgdl/txt. To disable this, set it's value to ""

/* Example change */
static const char prefix_dir[] = "organize/folder"; /* Do not end with trailing forward-slashes. */
/* Example disable */
static const char prefix_dir[] = "";


  • Make sure you don't end prefix_dir with trailing forward-slashes.

Miscellaneous Directory

This is the name of the directory where file and folder without a name are placed. By default, it's set to misc. Example: test is placed into $HOME/$DOCS/$sprefix_dir/misc/

/* Example change*/
static const char misc_dir_default[] = "miscellaneous"; /* Do not end with trailing forward-slashes. */


  • Make sure you don't end misc_dir_default[] with trailing forward-slashes.

Downloads & Documents Directories

If automatic checking of XDG fails, the program falls back to pwd struct method. If that fails too, then it defaults to downloads_dir_default[] and documents_dir_default[] respectively. By default, downloads_dir_default[] is set to Downloads, and documents_dir_defaults[] is set to Documents, relative to $HOME.

/* Default Downloads change example */
static const char downloads_dir_default[] = "dl"; /* Do not end with trailing forward-slashes */
/* Default Documents change example */
static const char documents_dir_default[] = "dox"; /* Do not end with trailing forward-slashes */


  • Make sure you don't end downloads_dir_default[] or documents_dir_default[] with trailing forward-slashes.

Advanced Configuration

This section is dedicated of the configuration of how the application operates in a low level. It won't be noticed for the average user.


The application should consume very little memory. Options like EVENT_BUF_LEN can be used to limit the amount of events read per iteration of the main while loop.

/* Example change */
#define EVENT_BUF_LEN (512 * (EVENT_SIZE + 16))

This is the amount of bytes to allocate for path buffers. Usually, ext4 supports upto 4096 characters. Which is the default.

/* Example change */
#define PATH_BUF_LEN 3072

This is the amount of bytes to allocate for command line buffers. It's a must for it to be atleast 2 times the size of PATH_BUF_LEN and a little more room, because move operations use command line.

/* Example change */
#define CMD_BUF_LEN ((PATH_BUF_LEN * 2) * 1.1) /* Do not remove the brackets. */

Built With

  • C - Language used.
  • inotify - Linux library used for watching files.



This project is licensed under the GPLv3 License - see the file for details.


I never found a downloads folder organizer that is so simple that you just install it and forget about it. Adding, I wanted to a project that would be suckless-compatible (if that exists). It's worthy to note that I made a 5-minute research 'session' about download organizer for Linux and didn't find any. Therefore I called this project the simplest. valid for version 1.3.0