Giter Club home page Giter Club logo

fileorganizer's Introduction

Downloads Organizer

Overview

This Python script helps you organize files in your Downloads directory by categorizing them into subfolders based on their file types. It automatically creates folders for each file type and moves the respective files into their corresponding folders.

Prerequisites

Before running the script, make sure you have the following:

  • Python 3.x installed on your computer.
  • The os, pathlib, and shutil libraries, which are typically included with Python.

Usage

  1. Clone or download the script to your computer.

  2. Open a terminal or command prompt.

  3. Navigate to the directory where you saved the script.

  4. Run the script using the following command:

    python DownloadManagerService.py
    
  5. The script will automatically find your Downloads directory and organize the files.

Script Details

  • The script first locates your Downloads directory using common paths in Windows.
  • It then retrieves a list of all files in the Downloads directory.
  • For each file, it extracts the file type (extension).
  • It creates a subfolder for each unique file type (e.g., PDFs, images, documents).
  • Files with the same type are moved into their corresponding subfolders.
  • The script prints each file movement operation to the console.

Example Output

Downloads directory found: C:\Users\YourUsername\Downloads
Moving C:\Users\YourUsername\Downloads\example.pdf >>> C:\Users\YourUsername\Downloads\pdf_folder
Moving C:\Users\YourUsername\Downloads\image.jpg >>> C:\Users\YourUsername\Downloads\jpg_folder
Moving C:\Users\YourUsername\Downloads\document.docx >>> C:\Users\YourUsername\Downloads\docx_folder

Customization

  • You can customize the file type categories and folder naming by modifying the script.
  • To add or modify categories, update the fileList variable.
  • To change folder naming conventions, adjust the folder naming logic in the script.

License

This script is provided under the MIT License.


fileorganizer's People

Contributors

vignesh160803 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.