Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#amunits]

DOSRename

Rename a directory or file

Declaration

Source position: amigados.pas line 1621

function DOSRename(

  const oldName: PChar;

  const newName: PChar

):LongBool;

function DOSRename(

  const oldName: string;

  const newName: pChar

):Boolean;

function DOSRename(

  const oldName: pCHAR;

  const newName: string

):Boolean;

function DOSRename(

  const oldName: string;

  const newName: string

):Boolean;

Arguments

oldName

  

File to rename.

newName

  

New name for the file.

Arguments

oldName

  

File to rename.

newName

  

New name for the file.

Arguments

oldName

  

File to rename.

newName

  

New name for the file.

Arguments

oldName

  

File to rename.

newName

  

New name for the file.

Description

Rename() attempts to rename the file or directory specified as oldName with the name newName. If the file or directory newName exists, Rename() fails and returns an error. Both oldName and the newName can contain a directory specification. In this case, the file will be moved from one directory to another.

Note: it is impossible to Rename() a file from one volume to another.


Documentation generated on: 2021-07-30