Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!uunet!midway!valley From: valley@uchicago (Doug Dougherty) Newsgroups: comp.os.msdos.programmer Subject: Re: minor problem with COPY command Message-ID: Date: 13 Dec 90 17:00:43 GMT References: <31600012@hpcvra.cv.hp.com.CV.HP.COM> Sender: news@midway.uchicago.edu (News Administrator) Organization: University of Chicago Lines: 26 everett@hpcvra.cv.hp.com.CV.HP.COM (Everett Kaser) writes: >OK, here's one for ya (and Microsoft). Lets assume that you have a program >called JUNK.COM in your current directory and it's 15385 bytes long (the >number doesn't matter). Now, do this: > COPY JUNK.* TEMPFILE >You shouldn't have any other files in the current directory that match JUNK.* >besides JUNK.COM. The result of this copy will be a file called TEMPFILE >with today's date and smaller than the original JUNK.COM (usually by a long >ways). What appears to be happening is that the COPY is being done as if >JUNK.COM was an ASCII file, and as soon as an EOF character (26) is encountered >the copy halts. The following will work: > COPY JUNK.* A: > COPY JUNK.* TEMPFILE.* > COPY JUNK.COM TEMPFILE >But NOT > COPY JUNK.* TEMPFILE >Seems like a bug to me. >Everett Kaser Hewlett-Packard Company >...hplabs!hp-pcd!everett work: (503) 750-3569 Corvallis, Oregon >everett%hpcvra@hplabs.hp.com home: (503) 928-5259 Albany, Oregon The whole "ASCII file/^Z = EOF" thing is a bug, in my view. All copying should be in binary mode. Editors should not append ^Zs to files. Foo on the Norton Editor!