Date: Wed, 11 Sep 2002 02:03:08 +0000 From: "Matthew Hanson" <[EMAIL PROTECTED]> Subject: Re: [LIB] OT: My challenge copying files
>From: Raymond <[EMAIL PROTECTED]> > >It's opensource, available from www.vim.org and not too hard to learn in >the sense that it's got all the GUI stuff (as well as the ":" prompt). You >can't get it to do the regular expressions from the GUI though but suitable >commands to do the necessary replacing and manipulations from the ":" >prompt would be: > >1,$s/^#.*\n//eg >1,$s/D\:\\mp3\(.*\)/copy\ \"D\:\\mp3\1\"\ \"E\:\1\"/eg > >The first gets rid of the inter-line junk, the second one inserts "copy" at >the front of each line, quotes the source then generates and quotes the >destination. Of course, this assumes all your MP3s are in d:\mp3\ and you >want them in e:\, replace the paths as necessary This looks pretty much like what I've done with a Word macro, but you actually know 'real' batch file coding. Mine's a bit simplistic, meant to run at the DOS command line. I don't seem to have the 'inter-line junk' you describe in the M3U files MusicMatch creates. They are pretty clean and simple compared to WinAmp's for some reason. The ascii of MM's look like this: E:\Mp3s\Folk\Joan Baez - Wildwood Flower.mp3 E:\Mp3s\50s\Buddy Holly - Wake Up Little Susie.mp3 E:\Mp3s\Folk\Janis Ian - She Must Be Beautiful.mp3 The Word macro then goes line by line adding 'copy' at the beginning of each line, surrounds the path to each file in quotes, and then adds the destination path at the end, �F:\Mix-1�. Ending up like this: COPY "E:\Mp3s\Folk\Joan Baez - Wildwood Flower.mp3" F:\Mix-1 COPY "E:\Mp3s\50s\Buddy Holly - Wake Up Little Susie.mp3" F:\Mix-1 COPY "E:\Mp3s\Folk\Janis Ian - She Must Be Beautiful.mp3" F:\Mix-1 I save the file with the .bat extension, click on it in WinExp, and it's off to the races. >(remember to double-backslash because a single backslash is a reserved >character). I'm guessing your editor executes all this right? >And yes I've tested those 2 on one of my playlists (and yes it generates >the right result), and no I didn't get it first go (it took me 3 tries to >get the second regexp right!). Heh... I couldn't see the middle of a set of paths that didn't apply when I executed the batch file a few times. A few scratches of the head and a little re-examination made the aleady simple obvious. I'm not going to be launching a business writing a new OS any time soon. >You could write yourself a little perl script that'd do it easy if you have >a (freeware) perl runtime for windows ... or you could get advanced and run >Cygwin ;-) I was thinking of Perl. I actually do have some experience there. But it was a while back, and I don't have all my reference books with me here. Though I could hop on down to the library if I was really serious. However there are two guys developing a VB GUI particularly to do this for the NEX II player. I just want to have something that will work for the moment until they work the bugs out of their software, and get it doing all we want. Uh oh.... Is that Pres coming? ... (shhhh.... ) Um... Yeah... I did finally figure out how to all of this with my >Libretto< (We'd better get out of here Raymond!) ;-P M _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com ************************************************************** http://libretto.basiclink.com - Libretto mailing list http://www.silverace.com/libretto/ - Archives -------TO UNSUBSCRIBE------- Reply to any of the list messages. The reply mail should be addressed to: [EMAIL PROTECTED] - Then replace any text on the message's subject line: cmd:unsubscribe --------TO UNSUBSCRIBE DIGEST------ Do above but with this on subject line: cmd:unsubscribe digest **************************************************************
