Frename, Ename, fr, Ame, fr – Visara Master Console Center Scripting Guide User Manual
Page 118
Chapter 5 Script Commands
Scripting Guide
118
FRENAME
Syntax:
FRENAME( $CurrentName, $NewName) ==> %Success
Description:
Renames a file.
Action:
The file CurrentName is renamed to file NewName.
Parameters:
$CurrentName. String expression. The name of the file to rename,
which is case-sensitive. Include any necessary file path.
$NewName. String expression. The new name of the file, which is
case-sensitive. Include any necessary file path.
Returns:
Numeric value, as follows.
Value
Meaning
0 (FALSE)
File was not successfully renamed.
1 (TRUE)
File was successfully renamed.
Notes:
1. Refer to Manifest Constants on page 42 for the constants reference
list.
2. If FileName does not exist, FALSE is returned.
3. If FileName exists but could not be renamed, FALSE is returned.
4. FRENAME can be used to rename any file on the MCC unit.
5. Using NFS, it is possible to rename virtually any file on any server
or mainframe from the MCC unit.
6. FRENAME() can take several moments to complete.
Example:
%Success := FRENAME( “SYS5”, “SYS5OLD”)
%Success := FRENAME( “\DATA\LPARS\SYS5”, “\DATA\SAVE\SYS5”)
See Also:
FCLOSE, FEXISTS, FOPEN, FREAD, FREWIND, FWRITE