RENAME Examples


Example 1:

 

  

RENAME

"PAYROLL.TXT","PAYROLL.OLD"

 

The file is renamed as specified if the destination file does not already exist or conflict with the operating system's rules for file names.

 

Example 2:

 

  

RENAME

"PAYROLL.TXT","\ARCHIVE\PAYROLL.TXT

 

The file is moved to the new name and location if it does not already exist or conflict with the operating system's rules for file names (MS-DOS).

 

Example 3:

 

  

RENAME

"c:payroll.txt","d:payroll.txt"

 

An I/O error occurs because an attempt is being made to move the file across to a different drive.

 

Example 4:

 

  

RENAME

"PAYROLL.TXT|127.0.0.1","PAYROLL.OLD"

 

The file is renamed as specified on the SUNDM Data Manager host at IP address 127.0.0.1.

 

Example 5:

 

  

RENAME

"PAYROLL.TXT|www.sunbelt-plb.com","PAYROLL.OLD"

 

The file is renamed as specified on the SUNDM Data Manager host at "www.sunbelt-plb.com".

 



PL/B Language Reference REMOVE Examples REPLACE Examples