Date: Tue, 10 Sep 2002 21:56:33 +0800 From: Raymond <[EMAIL PROTECTED]> Subject: Re: [LIB] OT: My challenge copying files
At 05:46 AM 10/09/2002 -0700, you wrote: >Date: Tue, 10 Sep 2002 12:42:02 +0000 >From: "Matthew Hanson" <[EMAIL PROTECTED]> >Subject: Re: [LIB] OT: My challenge copying files <snip> >>I find Microsoft Excel actually does a pretty good job at changing lists >>from something to something else ... > >Hmm�. No Excel around here to my knowledge. Does it do this as a part of >the normal operation? Or do you have to write macros. I'd just copy and paste it into Excel, add sorting numbers, sort to remove the inter-line junk, sort again to get it back into order then copy and replace to generate 2 columns of filenames, add quote columns front and back, add a 'copy' column at the front then highlight it all and copy and paste into a text file before removing the tabs. Its probably easier to write a macro to do it if you're doing it regularly but I find I do these sorts of things 1-off so I don't bother. >At this point, I could use Word to record a macro to do the job. I >started that the other day, but quit halfway through when I incorrectly >�realized� that a batch file in DOS wouldn�t be able to deal with long >file names. > > >VI/VIM/GVIM also do a pretty decent job ... > >Heh... That�s what I want to do. Boot up Mandrake, and spend the next >day or two memorizing commands! I use GVIM as my default text editor in Windows for both the libby and my workstation if it's any consolation ;-) It actually makes more sense to me to use it for something like the libby where it's a lot easier to use keyboard commands to do things than it is to always reach for the mouse cursor (the problem being it's harder to hit a button using the libby mouse than using a desktop pointing device, and by necessity the buttons have to be smaller or consigned to menus because of the reduced screen real-estate). 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 (remember to double-backslash because a single backslash is a reserved character). 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!). >If I had a copy of Visual Basic, it'd be fun to write a little app that >would automate the whole process. Womder if there's something free out >there I could play with. 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 ;-) >Thanks Raymond! Off to MS-Wordlandia... One of Neil's favorite resorts. ;-P or GVIM-land now ;-) - Raymond --- /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\ | | "Does fuzzy logic tickle?" | | ___ | "My HDD has no reverse. How do I backup?" | | /__/ +-------------------------------------------| | / \ a y b o t | [EMAIL PROTECTED] | | | Need help? Visit #Windows98 on DALNet! | | ICQ: 31756092 | Libretto IRC channel #Libretto on DALNet! | \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/ ************************************************************** 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 **************************************************************
