Xref: utzoo comp.sys.amiga.tech:6834 comp.lang.c:21212 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!aramis.rutgers.edu!topaz.rutgers.edu!armhold From: armhold@topaz.rutgers.edu (George Armhold) Newsgroups: comp.sys.amiga.tech,comp.lang.c Subject: rename() Keywords: Lattice 5.02, beginner question Message-ID: Date: 27 Aug 89 02:24:25 GMT Organization: Rutgers Univ., New Brunswick, N.J. Lines: 16 I'm working on a "mv" program. I'd like it to be smart enough to simply rename files/directories if they are on the same volume, rather than copying them. The rename function provided by Lattice (which is supposed to be ANSI) will not allow me to specify a path name in the new file. The manual states: "The old name can include a path, but the new name should not." This seems likes a rather odd restriction. Are file systems (especially AmigaDOS) built in such a way that 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 something? Is there a better way to do this? Thanks, -George armhold@topaz.rutgers.edu