save Command

Saves the contents of the current Editor window into a file.

Scope: File

Syntax

Parameters

Drive-Directory-Filename 
The drive, directory, and filename to which the file is saved.
/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 save command saves the contents of the current Editor window into a file. If no file name is specified, then the file is saved under the current file name. If a save macro for the current doctype exists in one of the directories specified in lpath, then the save command runs the save macro before writing the file to disk. The save macro is not called if the asshown option is specified.

Note: The Editor window will be renamed to the specified filename.

Examples

  1. To save a file to a new file name, type:
    save newname.c
  2. To save a file as it is displayed to a new file name, type:
    save newname.c /as

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
restore Command
trigger Command
changes Parameter
content Parameter
recentmenushow Parameter
noblanks Parameter