Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Desktop file manager

This Python script automatically organizes files in a specified source directory by moving them into categorized folders based on their file types (audio, video, images, documents).

How It Works

  • The script scans a source directory for files (e.g. your desktop).
  • Each file's extension is checked against predefined categories:
    • Audio (e.g., .mp3, .wav, .flac)
    • Video (e.g., .mp4, .avi, .mov)
    • Image (e.g., .jpg, .png, .gif)
    • Document (e.g., .pdf, .docx, .xls)
  • Files are moved to their corresponding destination folders:
    • Audio files → Music folder
    • Video files → Videos folder
    • Image files → Pictures folder
    • Document files → Documents folder
  • If a file with the same name already exists in the destination, the script renames the new file by appending a number to avoid overwriting.

Setup

  1. Clone the repository

    git clone https://github.com/NikolasChorianopoulos/Desktop-file-manager
  2. Change the source_dir variable to the directory you want to clean.

  3. Adjust the destination directories (dest_dir_audio, dest_dir_video, etc.) to your preferred folders.

  4. Modify or extend the lists of file extensions if needed.

Usage

Go to where you cloned the repo and simply run the script. It will process all files in the source directory and move them accordingly.

python3 Desktop_file_manager.py

Logging

The script outputs info messages to the console showing which files have been moved and where.

Requirements

  • Python 3.x
  • Standard Python libraries:
    • os
    • logging
    • shutil

No additional packages need to be installed.

About

A simple python script to help you organize your files fast and easy

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages