Skip to content

An organization tool for effortless file categorization and tidying up, simplifying your digital life.

License

Notifications You must be signed in to change notification settings

PKrystian/File-Arranger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Arranger

Table of Contents

About

File Arranger is an organization tool designed to simplify your digital life by categorizing and tidying up files in a specified directory based on their file extensions. It provides an automated way to move files into designated folders, helping you maintain a clean and organized file system.

The tool is written in Python and uses a configuration file to map file extensions to their corresponding categories. It supports both real file organization and dry-run mode to simulate the organization process without actually moving files.

Getting Started

Follow these instructions to get File Arranger up and running on your local machine.

Prerequisites

Before you start, make sure you have the following prerequisites installed:

  • Python 3.x
  • pip (Python package manager)

Installation

  1. Clone the File Arranger repository to your local machine:

    git clone https://github.com/PKrystian/File-Arranger.git
  2. Change to the project directory:

    cd File-Arranger
  3. Install the required Python dependencies using pip:

    pip install -r requirements.txt

Usage

File Arranger is designed to be used via the command line. To organize files in a directory, run the main.py script with the source directory as an argument. Optionally, you can use the --dry-run flag to perform a dry run without actually moving any files. I recommend running it before, to see if there are no problems. The output will be saved in log file.

Example usage:

python main.py /path/to/source/directory

Example usage (Windows):

python main.py '?:\path\to\source\directory' --dry-run

Note: Ensure that you have created a configuration file named config.py in the project directory. You can use the provided config.py file as a template and customize it according to your needs.

Configuration

File Arranger uses a configuration file (config.py) to map file extensions to categories. You can customize this file to define your own categories and file extensions. Here's an example of the configuration:

LOG_FILE_INFO = 'info.log'
LOG_FILE_ERROR = 'error.log'
OTHERS_CATEGORY = 'Others'
DIRECTORY_MAPPING = {
    'Documents': ['.txt', '.pdf', '.doc', '.docx', '.xls', '.xlsx', '.csv', '.ppt', '.pptx', '.odt', '.ods', '.rtf'],
    'Images': ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.svg', '.webp'],
    # Add more categories and file extensions here
}

You can add, remove, or modify categories and their associated file extensions to suit your organizational needs.

Contributing

Contributions to File Arranger are welcome! If you find issues or have ideas for improvements, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

An organization tool for effortless file categorization and tidying up, simplifying your digital life.

Resources

License

Stars

Watchers

Forks

Languages