Coder Social home page Coder Social logo

pochetes / desktop-cleaner Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3 KB

Program that organizes files downloaded into the desktop that are automatically sent to their respectable locations based on personal file structure.

Python 98.57% Batchfile 1.43%

desktop-cleaner's Introduction

DeskCleaner

This project uses a program named Watchdog which looks for file system events and interacts with the OS file explorer events. Once an a file or folder is modified, the system logs it as an event and matches its extension (with pathlib) to its respectable folder location (i.e file.pdf --> pdf folder, etc). Folders that are repeats are then duplicated numerically (i.e file.png --> duplicate --> file1.png --> file2.png, etc).

Pathlib allows program compatibility across all operating systems.

Contains a separate batch file to run from CLI.

Shutil library allows movement of a file from one location to another.

Structure

DeskCleaner uses a dictionary of all of the different extensions available for files in the windows OS. It then searches for the matching extension in the modified file and then applies its value which is the rest of the location to the file folders. For example,

file.png --> loops through dictionary keys of file extensions --> if file>.png< == dict.key --> accesses the values --> ~/Desktop/path/to/your/made/files

My files were personally structured as:

C:\Users\User
--> Desktop --> Roberto --> media --> audio images video --> other --> compressed executables fonts internet --> programming --> c&c++ database html&css javascript python shell --> text --> microsoft --> excel powerpoint word other --> system pdf text

Sources

  1. Resource that helped find all compatible file extensions https://www.computerhope.com/issues/ch001789.htm

  2. Watchdog Documentation https://pythonhosted.org/watchdog/index.html

  3. Pathlib Documentation https://docs.python.org/3/library/pathlib.html

  4. Shutil Documentation https://docs.python.org/3/library/shutil.html

desktop-cleaner's People

Contributors

pochetes 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.