Rockbox General > Rockbox General Discussion
A code / script to tell you which folder doesn't have the file cover.jpg
(1/1)
chico:
searches will tell you in which folder this file exist and it will print you a list.
How do you do the opposite, a reverse so i can put "cover.jpg" in all the folders that don't have one.
I've gotten as far as which file is not "cover.jpg" and it prints every file that isn't. I just want to know a list of which directory doesn't have the file "cover.jpg"
either in xp bat file or in the linux ubuntu terminal
thanks in advance
nick_p:
In Linux, the following will list directories under "/your_mp3_dir" that don't contain "cover.jpg"
--- Code: ---find /your_mp3_dir -type d -exec test ! -f {}/cover.jpg \; -print
--- End code ---
If you wanted to copy a file "standard_cover.jpg" into each
--- Code: ---find /your_mp3_dir -type d -exec test ! -f {}/cover.jpg \; -exec cp -n standard_cover.jpg {}/cover.jpg \;
--- End code ---
Or if you'd like to save some space (and all the files are on the same extN partition);
--- Code: ---find /your_mp3_dir -type d -exec test ! -f {}/cover.jpg \; -exec ln standard_cover.jpg {}/cover.jpg \;
--- End code ---
Navigation
[0] Message Index
Go to full version