SAVEAS - Save as New Name and Switch to it



[ file-name ]



The name of the file you wish to create.  In a multi-edit session (see below) you cannot specify a file-name.


SAVEAS will use all of the Edit data to create a new external file.  (It is not necessary, and not allowed, to specify .ZFIRST .ZLAST to get every line saved.)  

If you specify a simple (unqualified) file-name, then the file will be created in the same directory as the file being edited.  A relative file-path (such as MYPATH\MYFILE.TXT) will be created relative to the directory where the file is being edited.  If the file-name is a fully-qualified name, it is created directly where you specify.

If you do not specify a file name, a conventional Windows save dialog will be presented to allow you to select the location and file name to be created.

Note 1: If the filename already exists. you will not be allowed to SAVEAS using that name; you will see the message, File exists, use REPLACE to re-use it  Like the message says, in that case, use the REPLACE command instead.

Following creation of the new file, the current Edit Tab will be switched to the newly created file, replacing the tab for the original file which will no longer be displayed.  This is identical to the way 'Save As' is handled by conventional Windows editors.

Note 2: If the current edit data has not been saved in the original file and if you wish any changes to be saved there, do so before issuing the SAVEAS command.  Otherwise, the changes will only be saved in the new file created by SAVEAS; the changes will not be saved in your original file, and you will receive no notice that this has occurred.

Operation of SAVEAS in a Multi-Edit Session

You can issue a SAVEAS command in a multi-edit session as normal; but no file-name operand is accepted.

This will bring up a directory-browse dialog, where you choose a directory (or create one) where all the files in your multi-edit session are saved.  Once you do this, you will begin a new multi-edit session in which each =FILE> line will have the same file name and the (new) directory you have chosen.

You can do the SAVEAS selecting an existing, non-empty directory, but if any existing files have the same basic file names as the ones you are trying to save, the SAVEAS operation will be canceled.  (SAVEAS will not write over existing files.)  Thus, the normal and preferred procedure is to create a new empty directory (or take steps to ensure that the SAVEAS directory is empty ahead of time) as part of your SAVEAS process.

When you begin a multi-edit session using files originating from more than one directory, SPFLite permits you to have files in different directories with the same basic file name in the same session.  However, if you intend to do a SAVEAS command, all of the basic file names involved must be unique, since the SAVEAS command will save all of the files from your multi-edit session into the same directory.  If they are not unique, you can continue to use your multi-edit session, but you will not be able to issue a SAVEAS command.

When you  do a SAVEAS command, every file currently in the multi-edit session is saved to the new location, even files not currently in a modified state.

Created with the Personal Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation