Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dosrename(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

DOS services library

doscreate

dosopen

dosunlink

dosrename

Purpose

     Renames a DOS file.

Library

     DOS Services Library (libdos.a)

Syntax

     #include <dos.h>

     int dosrename (oldpath, newfile)
     char *oldpath, *newfile;

Description

     The dosrename subroutine changes the  name of a DOS file.
     The  file to  be renamed  is specified  by the  path name
     pointed to  by the oldpath  parameter.  The new  name for
     that  file is  specified by  the newfile  parameter.  The
     newfile parameter must be a simple file name and optional
     extension.

     The dosrename subroutine must not  be used to move a file
     from one  directory to another directory.   The dosrename
     subroutine  fails  if  the  file name  specified  by  the
     newfile parameter already exists  in the directory speci-
     fied by the oldpath parameter.

Return Value

     Upon successful completion, a value of 0 is returned.  If
     the dosrename subroutine fails, a value of -1 is returned
     and doserrno is set to indicate the error.

Related Information

     In  this  book:   "DOS  services  library,"  "doscreate,"
     "dosopen," and "dosunlink."

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026