Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> rename rename a disk file pp 96</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 RENAME                      Rename a Disk File                        pp 96

 Syntax:  Rename (FileVar,String) ;

 Type:    File

 Form:    Procedure

 Purpose: Rename file associated with FileVar to name specified by String.

 Notes:   Rename should never be used on an open file.  The renamed file will
          not have to be reassigned to FileVar.  Any further operations on
          FileVar will be done against the new file name.


 ----------------------------------------------------------------------------


 Usage:
       TYPE
          FileType = String [80]            ;  { Record length of 80       }
       VAR
          FileVar  : File of FileType       ;  { Set handle to this type   }

       BEGIN
          Assign (FileVar,'C:FileName.Ext') ;  { Assign name to handle     }
          Rename (FileVar,'C:TestName.Ext') ;  { Rename handle to new name }
       END.

See Also: Assign

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson