From e49690c0c69653792670b8a31c6f4894b172521a Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Fri, 26 Jan 2024 16:33:47 +0100 Subject: [PATCH] bin: add download organizer --- local/bin/organize.sh | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 local/bin/organize.sh 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!!" -- 2.51.2