Detailed Descriptions

RENAME

xcall RENAME, oldname, newname, status

RENAME.SBR (aka RENAM) provides the means to programmatically rename files. It will fail if oldname does not exist, or if newname does. Both oldname and newname support either AMOS or native operating system filenames, and also support the use of embedded environment variables (e.g. %MIAME%).

Parameters

oldname  (String)  [in]

current file name

newname  (String)  [in]

name to which the file is being changed

status  (F,6)  [out]

0 if successful, other if not

History

Beginning in A-Shell build 997 of November 2007, RENAME errors are logged to the ashlog.log file. In addition, if the SYSERR TRACE is active, they will be displayed on the screen. This is helpful in  recognizing and tracking down mysterious Windows rename errors.

Beginning in A-Shell build 958 of June 2006, RENAME properly handles the renaming of files without extensions and does not append .DAT to the new file name.