Path: utzoo!attcan!utgpu!cunews!spock!woody From: woody@spock (Woody Suwalski) Newsgroups: comp.os.msdos.programmer Subject: Re: "file cannot be copied onto itself" Message-ID: <4450@tools> Date: 17 Sep 90 14:20:05 GMT References: <2091@nyx.UUCP> Reply-To: woody@tools (Woody Suwalski) Organization: Mitel. Kanata (Ontario). Canada. Lines: 13 In article <2091@nyx.UUCP> cla@nyx.UUCP () writes: >Qvestion: > >How does the DOS "copy" command know when the source and destination file are >one in the same (i.e., "file cannot be copied onto itself")? I can't believe >that it's just a string compare. The logistics of that are pretty awkward. The trick is to change attribute of a "source" file, and then get attribute of the "destination". If "destination" is changed - you speak about the same file.... Of course, you should later restore old attribute... Woody