Bill Jonas on Tue, 5 Nov 2002 10:17:09 -0500


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

Re: [PLUG] split & cat


On Tue, Nov 05, 2002 at 08:43:10AM -0500, Arthur S. Alexion wrote:
> Well,
> copy /b file*.00? file*.exe
> worked to produce
> filename.exe.

Oh, okay.  So it works that way, too.

> What I thought was interesting was that it apparently got the order of 
> the files to be combined correctly.

You had them numbered sequentially, right?  It ordered them (probably
ASCII-betically) by filename.

On Tue, Nov 05, 2002 at 08:49:34AM -0500, Arthur S. Alexion wrote:
> (I guess a corrolary area of curiosity is whether 
> copy /b filename.003 + filename.001 + filename.002 filename.exe
> would get the files in order. That is, what internal test is done, if 
> any, to insure the parts are combined properly.)

There are *no* checks done.  The "copy /b file1 + file2 + file3
filename" is the same as "cat file1 file2 file3 >filename" in Un*x.  All
that DOS copy is doing is taking the files and combining them one after
the other, sequentially, in the order you specified, to the file you
specified for output.  If you did "copy /b file3 + file1 + file2
filename" or "cat file3 file1 file2 >filename", you'll get an incorrect
result for filename.  No magic and no checks. :)

-- 
Bill Jonas    *    bill@billjonas.com    *    http://www.billjonas.com/
"They that can give up  essential  liberty to obtain a little temporary
safety deserve neither liberty nor safety."        -- Benjamin Franklin

Attachment: pgphp1L65hnqI.pgp
Description: PGP signature