🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #958

rename()

#958
From: George Armhold
Date: Sun, 27 Aug 1989 02:24
16 lines
1141 bytes
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
Technical Details
Message-ID: <Aug.26.22.24.20.1989.10338@topaz.rutgers.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!aramis.rutgers.edu!topaz.rutgers.edu!armhold

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <Aug.26.22.24.20.1989.10338@topaz.rutgers.edu>
Date: 27 Aug 89 02:24:25 GMT
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 16