Closes all file views of the file, saving the changes.
Scope: File
Syntax
Parameters
Drive-Directory-Filename |
The drive ( |
/asshown or /as |
This option lets you save a different view of the file. The data is saved exactly as it is displayed at the time the command is issued. |
/nofilelist or /nfl |
The file saved is not shown in the recently-accessed file list in the File pull-down menu in the Editor window. |
Description
The file command ends the editing of the current file by saving it to a file and then quits from the file. If the save fails, the file is not closed. If a Filename is not specified, the name is derived from the current file name.
Examples
file /example/newtestdoc1.doc
file \example\newtestdoc1.doc
file newtest1.doc
All changes made to all file views are saved to the file name.
file /asshown
All changes made to the file in the view are saved to the current file name when the Editor is closed. Changes made to other views, if not copied to this view, are not saved.
API Return Codes
1 |
The filename already exists. The Editor asks if you want to overwrite the existing file with this file. |
2 |
The file was saved successfully with some lines truncated. |
-1 |
The filename is not valid. |
-2 |
A filename must be specified for an untitled document. |
-3 |
The file is empty. |
-6 |
The Editor encountered an error when the file was being saved. |
-7 |
The file was not saved because the nosave parameter is set to on. To save the file, set the nosave parameter to off and then use either the file or save command to save the file. |
-9 |
The file was open in another Editor window. |
![]()
preserve Command
qquit Command
quit Command
restore Command
save Command
nosave Parameter
