[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'System' (#rtl) |
Rename file on disk
Source position: line 0
procedure Rename( |
var f: file; |
const s: String |
); |
var f: file; |
p: PChar |
); |
var f: file; |
c: Char |
); |
var t: Text; |
const s: String |
); |
var t: Text; |
p: PChar |
); |
var t: Text; |
c: Char |
); |
Rename changes the name of the assigned file F to S. F must be assigned, but not opened.
Depending on the state of the \var{\{\$I\}} switch, a runtime error can be generated if there is an error. In the \var{\{\$I-\}} state, use IOResult to check for errors.
|
Delete a file from disk |
Program Example77; { Program to demonstrate the Rename function. } Var F : Text; begin Assign (F,paramstr(1)); Rename (F,paramstr(2)); end.
No notes exist for this page yet.