saveacopyas
saveacopyas
PATH

The saveacopyas statement saves a copy of the currently active file under a new name. The original database remains open in memory under its original name.

Parameters

This statement has one parameter:

path – is a path to the file to be saved, including the file name (see Files and Folders for more information about file paths). If you want to save the new file in the same folder as the existing file, this parameter can simply be the new file name. The path doesn’t have to have a file extension, but if it does, the extension must be `.pandb` (if omitted, the extension will be automatically added for you).

Description

The statement makes a copy of the current database on the disk, while leaving the original untouched and ready for further work. (Note: The original database is not saved to the disk, but it can be by simply using the save statement.)

This example saves a copy of the current file. If the original database is Sales, the copy will be something like Copy of Sales 3–16–2018.

    saveacopyas "Copy of "+info("databasename")+" as of "+datepattern( today(),"mm-dd-yyyy")

See Also

- Database Integrity Checks -- checking database integrity when opening and saving.
- print -- prints the database.
- printonerecord -- prints the the currently active record.
- revert -- reloads the last saved version of the database from the disk.
- save -- saves the database to disk.
- saveas -- saves a copy of the currently active file under a new name. The original file remains unchanged.

History

Version | Status | Notes
10.0 | Updated | Carried over from Panorama 6.0, but now allows the path to be either UNIX or HFS format. Also, the dialog option is no longer supported.