[Klug-general] genisoimage and files truncating.

James Morris jwm.art.net at gmail.com
Mon Apr 30 18:30:51 UTC 2012


On 30 April 2012 18:50, sharon kimble <boudiccas at talktalk.net> wrote:
> i am using genisoimage on this folder ...../home/boztu/Music/Irish Celtic
> Music Collection Version 2 .... which contains 2976 mp3s, but it is truncating
> the file names after the first word of their title. It appears to be doing this
> at the first space that it encounters, so I'm hoping someone can help me by
> suggesting a script that I can run that will remove all spaces in the file
> names, before .mp3, to enable genisoimage to run properly. The iso it creates
> is 18.9gbs in size and I then run split to make it into 4gb sized files to be
> burnt to dvds.
>

take the code between the two cut lines:

 ----------8<------------------
#!/bin/bash

find $1 -type f \(  -name '*.mp3'    \
                -o -name '*.MP3'    \) |
while IFS= read -r NAME;
do
DEST=`echo "$NAME" | tr ' ' '_'`
echo mv -v "${NAME}" "${DEST}"
done
 ----------8<------------------

and place into a file named ren_mp3s, and then to make it executable:

chmod +x ren_mp3s

and then do a test run of the script (it needs modification to do
anything other than a test run):

./ren_mp3s dir_containing_mp3s

make sure the output looks correct and then remove the echo command
from before the mv command.

hope that helps

james.


> Can you help me please?
>
> Thank
> Sharon.
> --
> A taste of linux = http://www.sharons.org.uk/taste/index.html
> efever = http://www.efever.blogspot.com/
> efever = http://sharon04.livejournal.com/
> Debian 6,0.4, Gnome 1:2.30+7, LibreOffice 3.5.2
> Registered Linux user 334501
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent



More information about the Kent mailing list