Move files into folders based on their filename / filepath using regular expressions.
- Free software: MIT license
- Documentation: https://files-to-folders.readthedocs.io.
- Sort files into folders based on their filename / filepath using regular expressions
- Can be used in the command line, e.g. in scripts or for piping
$ pip install git+https://github.com/d0m1987/files_to_folders.git
Assuming the following folder structure (that can be found in examples/first_simple_example)...
.
├── test_123.txt
└── test_124.txt
we run the following command in the folder with the structure above
$ files_to_folders --regexes "([a-z]*)_([0-9]*).txt" test_123.txt test_124.txt
This gives us the following folder structure:
.
├── files_to_folders.log
└── test
├── 123
│ └── test_123.txt
└── 124
└── test_124.txt
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.