Git Product home page Git Product logo

desktop_cleaner's Introduction

Desktop Cleaner

This Python script helps to automatically clean up your desktop by moving files into folders named after their extensions in your Documents directory.

How it works

The script uses the watchdog library to monitor your desktop for any changes. When a new file is added, it is automatically moved into a folder named after its file extension. If a file with the same name already exists in the destination folder, a timestamp is appended to the filename to prevent overwriting.

How to use

Prerequisites

  • Python 3
  • watchdog library. Install it using pip:
pip install watchdog

Running the script

  1. Download the script and place it in any directory.

  2. Run the script from a terminal: python desktop_cleaner.py

  3. Now, any file you add to your desktop will be automatically moved to an appropriate folder in your Documents directory.

Customizing the script

The script is set to monitor the Desktop and move files to the Documents directory. If you want to change these directories, modify the desktop_path and target_folder variables in the script:

desktop_path = os.path.expanduser("~/Desktop")  # Change this to your source directory
target_folder = os.path.expanduser("~/Documents")  # Change this to your target directory

Compatibility

This script should work on any operating system (Windows, MacOS, Linux) that supports Python. The desktop and documents paths are set to common defaults, but can be customized as needed.

License

This project is licensed under the MIT License.

desktop_cleaner's People

Contributors

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