info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Info-mtools] something like mkmanifest for long names?


From: Paul Fox
Subject: [Info-mtools] something like mkmanifest for long names?
Date: Mon, 30 Mar 2009 17:59:38 -0400

hi --

i'm writing a script to manage syncing music files from my
unix-based home audio system onto a portable mp3 player.

many of the mp3 files have names containing characters which
are illegal on the vfat filesystem.  while mtools is perfectly
happy to resolve this, there doesn't seem to be a way to find
out from mtools _how_ it was, or will be, resolved.  in the case
of music files, the filename as it appears on the music player
must also appear in accompanying playlists, and i can't create
the playlists if i can't find out the file's new name.

for example, consider this file:
    $ ls 01*
    01-Piano_Trio_in_Gm_:_I_Allegro.mp3

i copy it to my USB stick with mcopy, and let it autorename:
    $ mcopy 01-Piano_Trio_in_Gm_\:_I_Allegro.mp3 b:
    Long file name "01-Piano_Trio_in_Gm_:_I_Allegro.mp3" contains illegal 
character(s).
    a)utorename A)utorename-all r)ename R)ename-all
    s)kip S)kip-all q)uit (aArRsSq): A

i can now see what it did (which was replace the ':' with '_'),
but not really in very useful form:
    $ mdir b:
     Volume in drive B has no label
     Volume Serial Number is BB1E-0D0A
    Directory for B:/music

    .            <DIR>     2009-03-30  17:42
    ..           <DIR>     2009-03-30  17:42
    01-PIA~1 MP3  13263234 2009-03-30  17:49  
01-Piano_Trio_in_Gm___I_Allegro.mp3-1
            3 files          13 263 234 bytes
                            245 923 840 bytes free

and of course mkmanifest only really deals with pure 8.3 conversions, and
its output bears no resemblance to what really happened during the mcopy:
    $ mkmanifest 01-Piano_Trio_in_Gm_\:_I_Allegro.mp3
    mv 01-piano.mp3 01-Piano_Trio_in_Gm_:_I_Allegro.mp3

is there a way to ask mtools for the autorenamed version of a filename?

is there an easier/better/smarter way to solve my problem?  :-)
i suppose i'll simply have to figure out a new, legal, name for
the file before doing the mcopy, so that i know in advance what
it is.

finally, if anyone has suggestions for programs that already do
what i'm trying to do, preferably written in a scripting language,
i'd like to hear about them.  (offlist, of course.)

paul
=---------------------
 paul fox, address@hidden (arlington, ma, where it's 46.9 degrees)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]