From: Andre Ramnitz Date: Fri, 26 Jan 2024 15:33:47 +0000 (+0100) Subject: bin: add download organizer X-Git-Tag: v0.2~224 X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=e49690c0c69653792670b8a31c6f4894b172521a;p=dotfiles.git bin: add download organizer --- diff --git a/local/bin/organize.sh b/local/bin/organize.sh new file mode 100755 index 00000000..e1779234 --- /dev/null +++ b/local/bin/organize.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# Go to the downloads folder +cd ~/Downloads + + echo "Organizing your messy downloads folder" + +# First Create Some General Folders +mkdir Audios Videos PDFs Scripts Images Archives HTDOCS TXT Office Others 1> /dev/null 2> /dev/null + +# Audio Files +mv -nv *.mp3 *.m4a *.flac *.aac *.ogg *.wav *.WAV Audio_Files/ 1> /dev/null 2> /dev/null + +# Video Files +mv -nv *.mp4 *.mov *.avi *.mpg *.mpeg *.webm *.mpv *.mp2 *.wmv *.mkv Videos/ 1> /dev/null 2> /dev/null + +# PDFs +mv -nv *.pdf *.cbr *.cbz *.epub PDFs/ + +# HTDOCS +mv *.htm *.html *.HTM *.HTML HTDOCS/ + +# Word Docs and txt files +mv *.doc *.docx *.xls *.xlsx *.ppt *.pptx *.odf *.odt *.odp Office/ + +# ASCII +mv *.txt *.md *.asc *.ME TXT/ + +# Scripts +mv -nv *.py *.rb *.sh *.lua Scripts/ + +# Image Files +mv -nv *.png *.jpg *.jpeg *.tif *.tiff *.bpm *.gif *.eps *.raw *.webp Images/ + +# Notebooks +#mv *.ipynb Notebooks + +#Debian File +# mv *.deb Debian_Files + +#TXZ_Files + +# Archives +mv -nv *.zip *.rar *.tar.* *.xz *.txz *.tgz Archives/ + +#Other +mv -nv *.* Others/ + + +# cd Scripts +# mv organize.sh .. #the organize script is also sorted into the scripts folder, so take it out. +# cd .. + +notify-send "All sorted!!"