jay-m-patel / file-organizer

A command line tool made in python to organize scattered files and directories at any path.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File organizer

This is a python project to organize scattered files and/or directories.

Demo

Installation

The repo contains an executable file in dist folder which should be placed in the system such that it can be called globally.

If you need to make a new executable file, go to the directory where this repo is located and type following command in terminal. A new executable file will be created in dist directory.

pyinstaller main.py --onefile

Copy the executable file to bin to run it from anywhere.

cp ./dist/main /bin/organize_files

Usage

organize_files --help

Positional argument: organize_by

organize_files <organize_by>

Used to set the type by which files/folders are supposed to be organized. Choices: by_extension by_size by_last_modified

Example:

organize_files by_size

Optional argument: --src | -S

organize_files <organize_by> [--src SRC]

Used to set the source directory where unorganized files/folders exist. Can take absolute/relative path as value. Default is set to desktop.

Example:

organize_files by_size --src ./organize_this_directory

Optional argument: --dist | -D

organize_files <organize_by> [--dist DIST]

Used to make a an existent/non-existent directory as destination where files/folders are organized. Can take absolute/relative path as value. Default is set to a new(non-existent) directory in desktop.

Example:

organize_files by_size --dist /home/user_name/work_directory/organized_files

Optional argument: --include_sub_directories | -SUBDIR

organize_files <organize_by> [--include_sub_directories]

Used to state whether or not to include files within sub-directories while organizing the source directories. Default is false. If it is desired to be made true, it should be included in command without any value.

Example:

organize_files by_size -SUBDIR

Optional argument: --ignore

organize_files <organize_by> [--ignore [IGNORE ...]]

Used to ignore files/directories from the source directory. Add space-separated names.

Example:

organize_files by_size --src ~/work_directory -SUBDIR --ignore imp_file.txt ignore_this_directory

About

A command line tool made in python to organize scattered files and directories at any path.


Languages

Language:Python 100.0%