Skip to content
The file management automation tool.
Branch: master
Clone or download
tfeldmann Merge pull request #28 from mope1/fix-pyyaml-warnings
fixed warning for using unsafe yaml load method (encountered in tests)
Latest commit a4df227 Apr 9, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs add counter_separator settings to copy, move, rename Oct 5, 2018
organize fixed warning for using unsafe yaml load method Apr 7, 2019
tests add counter_separator settings to copy, move, rename Oct 5, 2018
.editorconfig add .editorconfig and .gitignore Oct 6, 2017
.gitignore add vscode dir to gitignore Jul 9, 2018
.travis.yml update changelog for v1.4.2 Nov 14, 2018
LICENSE.txt update for upload Mar 13, 2018 update for upload Mar 13, 2018
Makefile use wheels for distribution Mar 14, 2018
README.rst update readme Mar 19, 2018 code reorg Mar 2, 2018 remove unneeded import Feb 8, 2019 update todo and bump version Oct 5, 2018


Documentation Status


The file management automation tool.

Install via pip (requirement: Python 3.3+):

On macOS / Windows: $ pip3 install organize-tool

On Linux: $ sudo pip3 install organize-tool

Why you might find this useful

Your desktop is a mess? You cannot find anything in your downloads and documents? Sorting and renaming all these files by hand is too tedious? Time to automate it once and benefit from it forever.

organize is a command line, open-source alternative to apps like Hazel (macOS) or File Juggler (Windows).

In your shell, run $ organize config to edit the configuration:

  • config.yaml:

      # move screenshots into "Screenshots" folder
      - folders:
          - ~/Desktop
          - Filename:
              startswith: 'Screen Shot'
          - Move: ~/Desktop/Screenshots/
      # move incomplete downloads older > 30 days into the trash
      - folders:
          - ~/Downloads
          - Extension:
              - download
              - crdownload
              - part
          - LastModified:
              days: 30
              mode: older
          - Trash

(alternatively you can run $ organize config --path to see the full path to your config.yaml)

$ organize run will now...

  • move all your screenshots from your desktop a "Screenshots" subfolder (the folder will be created if it does not exist)
  • put all incomplete downloads older than 30 days into the trash

It is that easy.

Feeling insecure? Run $ organize sim to see what would happen without touching your files.

But there is more. You want to rename / copy files, run custom shell- or python scripts, match filenames with regular expressions or use placeholder variables? organize has you covered.

Have a look at the full documentation at

Advanced usage example

This example shows some advanced features like placeholder variables, pluggable actions and recursion through subfolders:

  - folders: '~/Documents'
    subfolders: true
      - Extension:
          - pdf
          - docx
      - LastModified
      - Move: '~/Documents/{extension.upper}/{lastmodified.year}/'
      - Shell: 'open "{path}"'

Given we have two files in our ~/Documents folder (or any of its subfolders) named script.docx from year 2018 and demo.pdf from year 2016 this will happen:

  • script.docx will be moved to ~/Documents/DOCX/2018/script.docx
  • demo.pdf will be moved to ~/Documents/PDF/2016/demo.pdf
  • The files will be opened (open command in macOS) from their new location.


Select files by (filters):

  • Extension
  • Regular expression
  • Last modified date (newer, older)
  • Filename (startswith, endswith, contains)

Organize your files (actions):

  • Move files
  • Copy files
  • Rename files in place
  • Run shell command
  • Run inline Python code
  • Move into Trash
  • Print something to the console

If you miss a feature please file an issue. Pull requests welcome!

Command line interface

The file management automation tool.

    organize sim
    organize run
    organize config [--open-folder | --path | --debug]
    organize list
    organize --help
    organize --version

    sim             Simulate a run. Does not touch your files.
    run             Organizes your files according to your rules.
    config          Open the configuration file in $EDITOR.
    list            List available filters and actions.
    --version       Show program version and exit.
    -h, --help      Show this screen and exit.

    -o, --open-folder  Open the folder containing the configuration files.
    -p, --path         Show the path to the configuration file.
    -d, --debug        Debug your configuration file.

Full documentation:
You can’t perform that action at this time.