Last active
June 8, 2017 17:18
-
-
Save essboyer/3f84afc9595b068869fb0baf1e2a51b5 to your computer and use it in GitHub Desktop.
Remove all artwork (jpg) and clutter files (desktop.ini) from Music directories on AndroidOS
This file contains 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 D in *; do | |
if [ -d "${D}" ]; then | |
dir="${D}" | |
cd "$dir"; | |
echo `pwd` | |
echo | find ./ -iname '*.jpg' | |
if [ -f Folder.jpg ]; then | |
mv Folder.jpg folder.jpg | |
fi | |
if [ -f cover.jpg ]; then | |
mv cover.jpg folder.jpg | |
fi | |
if [ -d Art ]; then | |
rm -rf Art | |
fi | |
if [ -f desktop.ini ]; then | |
rm -f desktop.ini; | |
fi | |
if [ -f BBThumbs.dat ]; then | |
rm -f BBThumbs.dat; | |
fi | |
if [-f *.txt ]; then | |
rm -f *.txt; | |
fi | |
if [ -f folder.jpg ]; then | |
mv folder.jpg folder.tmp; | |
rm -rf *.jpg *.jpeg; | |
mv folder.tmp folder.jpg | |
fi | |
cd ..; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment