Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!sunybcs!boulder!tramp!hartkopf From: hartkopf@tramp.Colorado.EDU (Jeff Hartkopf) Newsgroups: comp.sys.apple Subject: comparing file/path names under GS/OS Message-ID: <14966@boulder.Colorado.EDU> Date: 18 Dec 89 04:03:46 GMT Sender: news@boulder.Colorado.EDU Reply-To: hartkopf@tramp.Colorado.EDU (Jeff Hartkopf) Organization: University of Colorado, Boulder Lines: 26 How do I check to see if two path names are the same using GS/OS, but not using ProDOS file system conventions? For example, in a file copy routine, I have the user choose the file to copy from a Standard File get file dialog and the new path name from a put file dialog. Say the new file name is the same as the old, but in a different folder--normally I could just delete the destination file before creating it again, then copying to it. But it's possible that the user will choose the identical pathname as the destination file, except, say, with different capitalization in the file name. In this case I couldn't delete the file, because then there would be nothing to copy from! So what I need is some way to tell if I should delete the destination file: if it's in the same directory, with the same file name (according to the current file system) no, but otherwise yes. And I can't convert the path names to upper case and compare them, because that's ProDOS convention--I want it to work with any file system. 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 Internet: hartkopf@tramp.Colorado.EDU