Skip to content

Sergih28/downloads-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

downloads-automation

What it does

  • Moves automatically downloaded files into different folders, depending on its extension. It excludes hidden files.
  • Detects if a file hasn't completed downloading and waits until it has to move it.
  • Creates a log with the timestamp, origin and destination of the file that is being moved.
  • Outputs on the console some feedback about what steps it is doing.
  • If used with Cron as explained below, it outputs the errors as well, and it's always running in the background.
  • When referring to files, same things apply to folders.

What I learned

  • Basic stuff with Python (function, class, tuple, loop)
  • File management with Python (writing a log)
  • Refreshed my knowledge about Cron

Requirements

  • Python 3 (version 3.8.1 used when creating the script)
  • Watchdog package (pip install watchdog)

How to set up (macOS 10.15.3)

  1. Clone the repository

  2. Install Python 3

  3. Install pip

  4. Create a crontab file

    • crontab /Users/sergi/Documents/crontab
  5. Add this line to crontab, that will execute automatically the script every time we boot up the OS and throw any errors in a file:

    • @reboot cd /Users/sergi/Documents/downloads-automation && ./downloads_automation.sh 2>/Users/sergi/Documents/startup/downloads_automation_error.txt
  6. Restart, and enjoy!

App idea taken from Kalle Hallden on his video

About

Move automatically downloads files into different folders, depending on its extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published