Skip to main content

The file management automation tool.

Project description

https://github.com/tfeldmann/organize/raw/master/docs/images/organize.svg?sanitize=true Documentation Status https://travis-ci.org/tfeldmann/organize.svg?branch=master

organize

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:

    rules:
      # move screenshots into "Screenshots" folder
      - folders:
          - ~/Desktop
        filters:
          - Filename:
              startswith: 'Screen Shot'
        actions:
          - Move: ~/Desktop/Screenshots/
    
      # move incomplete downloads older > 30 days into the trash
      - folders:
          - ~/Downloads
        filters:
          - Extension:
              - download
              - crdownload
              - part
          - LastModified:
              days: 30
              mode: older
        actions:
          - 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 https://organize.readthedocs.io/.

Advanced usage example

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

rules:
  - folders: '~/Documents'
    subfolders: true
    filters:
      - Extension:
          - pdf
          - docx
      - LastModified
    actions:
      - 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.

Functionality

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.

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

Arguments:
    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.

Options:
    -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: https://organize.readthedocs.io

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

organize-tool-1.4.2.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

organize_tool-1.4.2-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file organize-tool-1.4.2.tar.gz.

File metadata

  • Download URL: organize-tool-1.4.2.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for organize-tool-1.4.2.tar.gz
Algorithm Hash digest
SHA256 e4745f6f57030f05734b75f5bde0211f9334078aa96b606f55ff89feabe0fcfc
MD5 dc8e3066ebc5de1ba8f7a13a7e8dba7f
BLAKE2b-256 cff5631d33e24e98359b02b36654a5aed524d8eb72d24463d774778f1458bc5a

See more details on using hashes here.

File details

Details for the file organize_tool-1.4.2-py3-none-any.whl.

File metadata

  • Download URL: organize_tool-1.4.2-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for organize_tool-1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6b3b7261d31f6a548f1eaa08a011ce099f3572e035571b92e8faccb0e37457e7
MD5 3272cef11cab9ef46bdb025bfd16fe59
BLAKE2b-256 a7f177f9afefb5846519c13e8c9c91b79e131176497e4692552a49fe78ea3f9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page