The Following 2 Users Say Thank You to qwazix For This Useful Post: | ||
|
2011-07-06
, 00:12
|
|
Posts: 220 |
Thanked: 66 times |
Joined on Aug 2010
@ Melbourne, Australia
|
#2
|
|
2011-07-06
, 07:48
|
|
Posts: 1,411 |
Thanked: 1,330 times |
Joined on Jan 2010
@ Tatooine
|
#3
|
#!/bin/sh MUSICDIR="/home/user/MyDocs/Music" find "${MUSICDIR}" -iname *.jpg -o -iname *.jpeg | while IFS="" read FILE; do DIRNAME=`dirname "${FILE}"` LASTPART=`echo "${DIRNAME}" | awk -F '/' '{print $NF}'` if [ "${LASTPART}" != ".mediaartlocal" ]; then if [ "$1" = "-d" ]; then echo "${FILE} will be moved to ./mediaartlocal/" else echo "Moving ${FILE} -> ./mediaartlocal/" if [ ! -d "${DIRNAME}/.mediaartlocal/" ]; then mkdir "${DIRNAME}/.mediaartlocal/" fi mv "${FILE}" "${DIRNAME}/.mediaartlocal/" fi fi done
The Following 3 Users Say Thank You to jedi For This Useful Post: | ||
|
2011-07-07
, 11:40
|
|
Posts: 220 |
Thanked: 66 times |
Joined on Aug 2010
@ Melbourne, Australia
|
#4
|
find "${MUSICDIR}" -iname *.jpg -o -iname *.jpeg etc
-iname *.png
|
2011-07-07
, 11:49
|
|
Posts: 1,411 |
Thanked: 1,330 times |
Joined on Jan 2010
@ Tatooine
|
#5
|
Re: the above, some of my album art files are in .png format.
Can you change
to includeCode:find "${MUSICDIR}" -iname *.jpg -o -iname *.jpeg etc
? And any other file types?Code:-iname *.png
The Following User Says Thank You to jedi For This Useful Post: | ||
Tags |
album art, music player, tracker |
|
edit: the script doesn't delete anything, it just recursively makes AlbumArtblahblah and folder.jpg's hidden