[<<]Message[>>]    [<<]Author[>>]    [<<]Subject        [<<]Thread[>>]

Number : 2454 Date : 2002-07-11 Author : Garry Deane Subject : Re: CD-write sans Direct-CD (& alphabetical order again) Size(KB) : 3
Unless you need to do this on a regular basis, it would be easy enough to simply select the files in explorer which will give you a running total of the file size and when you get to near your 700MB limit, copy those files to a temporary directory before copying to the CD. Just remember where you left off and repeat the process for the next CD. If you want to automate this, I'd suggest using a batch file which does something similar. You wouldn't even need Xxcopy (sorry Kan) although Xxcopy's list options piped though sort would be useful if you need to deal with sub-directories. If you are using NT/W2k/XP this is pretty straightforward using native commands. If you are using DOS/W95/W98/ME, you'll need a utility program like STRINGS to add some batch functionality. Here's a rough outline of how I'd attack this problem assuming that the source directory is a 'flat file' i.e. not taking account of how you'd deal with sub-directories. :: Pseudo code to copy files in sorted order :: Create a sorted file list dir /x/-c/o:n/a:-d d:\data\*|find "/" > filelist.txt :Start initialise variables delete temp directory files :Loop read line n of filelist.txt and extract the file size and filename (3rd and 4th tokens) add the file size to the total size if the total size < limit copy filename to temp directory else output the line read from filelist.txt to filelist.new endif inc line no goto :Loop create CD with files from temp directory if all well delete filelist.txt rename filelist.new filelist.txt goto :Start else abort? endif Frankly though, I don't think it's worth the effort. Just figure out in advance that (say) all the a*-f* files will fit one CD with some room to spare for future files, all the g*-m* files will fit another CD etc, then just use repeated xxcopy commands or the /IN parameter. It hardly matters that you might end up using a few extra CD's - they don't cost much. Garry --- In xxcopy@y..., "dontsendjunk2me" wrote: > i think i'm back to that 700M partition again, if i want some > semblence of sorting to the files. i was thinking of using a scheme > like > > > copy a* > > copy b* > > copy c* > > ... > > to get semi-alphabetical order, but that doesn't seem compatible with > the /Q switches, because the quota would seem to reset after each > letter of the alphabet. > > i did the research, and now understand why the "alphabetical-order" > feature is not likely to be implemented in xxcopy anytime soon. but > what about other ways to copy files in a certain order? pkzipc > (command line) lets me input a listfile as the first argument. i'll > try that, and see if it copies files in the order of the listfile. > > or, can the source specifier and multiple files in the /in switch be > parsed in either strict forward or reverse order? > > example: > xxcopy a* C:\cdtemp\ /QBL:700M /in b* /in c* ... > (forgive my probably bad and nonfunctional xxcopy syntax; i haven't > really dabbled in this fancy stuff yet.) > this could theoretically do what i want to do, if it was parsed the > way i want it to be. i'll test that now. >
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.