Created
February 19, 2021 03:03
-
-
Save jimkang/69bb7ffb4718d26eb78de45a20e43fad to your computer and use it in GitHub Desktop.
When you download from Bandcamp, the zip file comes with no directory structure, so this gives it one. Explanation: https://jimkang.com/weblog/articles/bandcamp-unzip/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in *.zip | |
do | |
filename="${file%.*}" | |
# Filenames can't contain /. So, I wonder | |
# what Bandcamp would do if they had AC/DC? | |
unzippath=$(echo "$filename" |sed -e 's/ - /\//') | |
mkdir -p "$unzippath" | |
unzip "$filename" -d "$unzippath" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment