Giter Site home page Giter Site logo

auto-downloads-manager's Introduction

Auto-Downloads-Manager

Whenever you download files they get saved in downloads folder or you have to manually select the folder to which location you want to save the file.

Manually selecting the location everytime you download something is pain.

Most of them select download folder as default location. So whenever you download files, all the files in download folder become a cluter.

What this python code does is whenever u download file it automatically moves them to Documents/Videos/Music/Photos folder based on file extension.

To make this code run on your system edit lines 26,54,59,64,69,76 by replacing with the respective file location in your system

How the Algorithm works:

So whenever you download a file from web browser it saves the file with extension .crdownload and with download completes it saves the file with its original extension(like .mkv,.jpg etc) which basically is just renaming the file.

Whenever the download completes the code calls the function on_moved(as whenver the download completes it renaming the file with orginal extension).

<FileMovedEvent: src_path='/home/anakin513/Downloads/Unconfirmed 198492.crdownload', dest_path='/home/anakin513/Downloads/NewReg - CSE and AI - v3.pptx', is_directory=False>

src_path is file name while downloading and dest_path is the downloaded file name

This function on_moved checks whether src_path ends with '.crdownload' extension and if yes then move the file to respective Documents/Videos/Music/Photos folder based on file extension.

YOU CAN SEE ALL THE LOGS(THE FILES MOVED BY THE CODE) IN logfile.log

HOW TO RUN THE CODE

1.Run "pip install requirements.txt"

2.Edit lines 26,54,59,64,69,76 with respective locations in your system.

3.Run the code and Done!

WARNING:

1.Whenever you download the file you cant open it from your web browser as the file doesnt exist in download folder location.

2.This algorithm doesnt move files to their respective folder if you have manually copied file from one directory and pasted them in the Downloads folder. So it allows you to store some important files in Downloads folder.

auto-downloads-manager's People

Contributors

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