Xref: utzoo comp.sys.amiga.tech:6848 comp.lang.c:21221 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!eecae!cps3xx!usenet From: usenet@cps3xx.UUCP (Usenet file owner) Newsgroups: comp.sys.amiga.tech,comp.lang.c Subject: Re: rename() Keywords: Lattice 5.02, beginner question Message-ID: <4331@cps3xx.UUCP> Date: 27 Aug 89 23:13:02 GMT References: Reply-To: porkka@frith.UUCP (Joe Porkka) Organization: Michigan State University Lines: 22 In article armhold@topaz.rutgers.edu (George Armhold) writes: > >I'm working on a "mv" program. I'd like it to be smart enough to >renaming a file to a new directory presents a problem? The function >also seems to fail when I try to rename a directory. Am I missing ^^^^^^^^^^^^^^^^^^ I don't know what ANSI says about this, but MessyDos has problems with renameing directories. I don't know why. I suggest that you use AmigaDOS directly. It will make your program smaller, faster, and non-portable, but would do the job better. The problem with using ANSI functions instead of the native OS functions is that they have only a subset of the functionality of the OS functions. The advantage to using the ANSI functions is portablility, or course. The AmigaDOS Rename function takes a source path and a destination path. If you try the rename accross devices, it will fail and IoErr() will return the "Cant rename across devices" error. REAL NAME: Joe Porkka jap@frith.cl.msu.edu