COPY - Include an External File

Syntax


COPY

[file-name | * ]

[ from-line  to-line ]  

[ { BEFORE | AFTER }  line-label ]


Operands


file-name | *

The name of the file you wish to include in the edit data.


If a single * is entered, it requests the filename to be fetched from the current clipboard contents.


from-line  to-line

Represents the starting line number, and ending line number, of the file you are copying from.  If used, both the from-line and the to-line must be present, but need not be in ascending order.  If one number is larger than the actual number of lines in the copied file, it is treated like the line number of the last line in the copied file was specified.  If both numbers are larger than the actual number of lines in the copied file, the effect is the same as if an empty file were copied.  When these numbers are omitted, the entire file is copied.


{ BEFORE | AFTER }

line-label

If specified, the file is copied before, or after, a defined line label.  


If a before/after line label is not specified, the file is copied into the current edit file in one of the following ways:

  • before a B line command
  • after an A line command
  • repeatedly before the lines in a BB block
  • repeatedly after the lines in an AA block
  • into a H/HH block, replacing the existing lines in that H/HH block


Description


COPY adds a copy of data that already exists to the edit session.  


To copy data into an empty file:

On the Command line, type:

COPY filename


The filename operand is optional.  If you do not specify it, the standard Windows file open dialog will be displayed. You may then select the filename in this dialog.


Press Enter.  The data is copied.


To copy data into an existing edit file:


Use the A,  B, AA, BB, or H/HH line commands to indicate where the copied data is to be inserted, or use the BEFORE/AFTER line-label option


On the Command line, type:

COPY filename


The filename operand is optional.  If you do not specify it the standard Windows File Open dialog will be displayed. You may then select the filename in this dialog.


Press Enter. The data is copied.  


Note: If the current edit session is not empty, and you do not specify a destination, you will be asked to provide one of the destination options described above.


Determining the Default Directory


When COPY is specified with no filename operand at all, or with just a simple unqualified filename, the default directory is used for searching for the file.  Or, if an Open dialog is displayed, Open dialog's starting directory will be determined as follows:


If there is a named file being edited in the tab where the command is issued, then the path for named file is used as the default for the command.  


If there is no active file being edited, when the tab header displays (Empty):


Keep in mind that the “Working directory” means the directory that was active when SPFLite was started, if you start it from a command line.  If you start SPFLite from a desktop icon, the working directory is the Start path defined in the icon's Property window.


Created with the Personal Edition of HelpNDoc: Full-featured EPub generator