]> Freerunner's - dotfiles.git/commitdiff
bin: add download organizer
authorAndre Ramnitz <tux.rising@gmail.com>
Fri, 26 Jan 2024 15:33:47 +0000 (16:33 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Sun, 18 Aug 2024 16:18:53 +0000 (18:18 +0200)
local/bin/organize.sh [new file with mode: 0755]

diff --git a/local/bin/organize.sh b/local/bin/organize.sh
new file mode 100755 (executable)
index 0000000..e177923
--- /dev/null
@@ -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!!"