Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Move a file from one directory to another. Message-ID: <7460@hoptoad.uucp> Date: 26 May 89 19:13:22 GMT References: <2638@lethe.UUCP> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 18 In article <2638@lethe.UUCP> drew@lethe.UUCP (Drew Sullivan) writes: >How does a program move a file from one directory to another. > > Rename("\pvol:dir:file", 0, "\pvol:dir2:file"); > >fails. I know it can be done, the finder does it. > > Think-C's rename(from, to) should have handled the case >for moving from directory to directory, but it doesn't either. Use the PBCatMove function documented in Inside Mac IV-157. It will move not only files but directories. PBRename and PBHRename only change the name of a file within its current folder. -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "I am convinced that cross-posting is an evil Satanic plot." -- Eugene Miya on soc.net-people, misc.headlines, misc.kids, misc.misc, news.misc, and soc.misc