egd;470876 Wrote:
While you're at it, any chance of a script that traverses a directory
tree and renames the directory based on the following conditions:
Read a track in the folder - any track:
if compilation=1 foldername becomes VA - ALBUM
else foldername becomes ALBUMARTIST - ALBUM
What if you want to rename all Folder.jpeg files in your library to
folder.jpg
Then use this:
Code:
#!/bin/bash
#
LIBRARY=/library/music
OLD=Folder.jpeg
NEW=folder.jpg
#
find $LIBRARY -name $OLD | while read filename ; do mv $filename `echo
$filename
Ronald, forgive my ignorance, but how do I actually run this (the first
one)? I've copied and placed the script in Notepad. What extension do I
give it when I save it off? I assume I have to run it from a cmd window,
but if so what does the command string look like?
--
tonyptony
tonyptony;470539 Wrote:
Ronald, forgive my ignorance, but how do I actually run this (the first
one)? I've copied and placed the script in Notepad. What extension do I
give it when I save it off? I assume I have to run it from a cmd window,
but if so what does the command string look like?
Duh. Thanks. I'll have to pull out one of my old DOS books to dig up
batch file commands.
--
tonyptony
tonyptony's Profile: http://forums.slimdevices.com/member.php?userid=3397
View this thread:
Yep, sorry. I only speak linux ;-)
--
tingtong5
tingtong5's Profile: http://forums.slimdevices.com/member.php?userid=9671
View this thread: http://forums.slimdevices.com/showthread.php?t=69324
While you're at it, any chance of a script that traverses a directory
tree and renames the directory based on the following conditions:
if compilation=1 foldername becomes VA - ALBUM
else foldername becomes ALBUMARTIST - ALBUM
Case of text etc. must be taken exactly as given in said tags. If
And to remove unwanted m3u playlists this might help ;-)
Code:
#!/bin/bash
#
LIBRARY=/library/music
#
number=`find $LIBRARY -name *.m3u -print | wc -l`
find $LIBRARY -name *.m3u -exec rm -f {} \;
echo $number playlistfiles have been removed!