Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!apple!dlyons From: dlyons@Apple.COM (David A. Lyons) Newsgroups: comp.sys.apple Subject: Re: comparing file/path names under GS/OS Message-ID: <37445@apple.Apple.COM> Date: 20 Dec 89 22:28:49 GMT References: <14966@boulder.Colorado.EDU> Organization: Apple Computer Inc, Cupertino, CA Lines: 25 In article <14966@boulder.Colorado.EDU> hartkopf@tramp.Colorado.EDU (Jeff Hartkopf) writes: >How do I check to see if two path names are the same using GS/OS, but >not using ProDOS file system conventions? >[...] >If anyone has any ideas, or has a different way to handle copying a file >onto the same file name, please let me know! Thanks. > >Jeff Hartkopf Hmmm...this is a slightly wimpy answer, but here's an alternate approach. Just OPEN the source file before you try to open or destroy the destination file. If the files are the same then the Destroy or Open (for Write permission) will fail. This won't help you know when to display a very specific message about not being able to replace a file with itself, but you could display something more generic ('The file Blah is in use and can't be replaced' or whatever). -- --David A. Lyons, Apple Computer, Inc. | DAL Systems Apple II Developer Technical Support | P.O. Box 875 America Online: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.