SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Vol 2

COPY

Name:
    COPY
Type:
    Support Command
Purpose:
    Copy all, or specified lines, of one file to another file.
Syntax 1:
    COPY <file1> <file2>
    where <file1> is the name of the file to be copied;
    and <file2> is the name of the file to be copied to.

    This syntax copies all lines in <file1> to <file2>

Syntax 2:
    COPY <file1> <file2>
                            FOR I = <start> <inc> <stop>
    where <file1> is the name of the file to be copied;
                <file2> is the name of the file to be copied to;
                <start> specifies the first line in <file1> to copy;
                <inc> specifies the increment between lines in <file1> to copy (this is almost always 1);
    and <stop> specifies the last row in <file1> to copy.

    This syntax is useful for copying selected parts of a file.

Syntax 3:
    COPY SYSTEM <file1> <file2>
    where <file1> is the name of the file to be copied;
    and <file2> is the name of the file to be copied to.

    This syntax specifies that an operating system command should be used to perform the copy. Specifically, on Linux/Unix and MacOS platforms the "cp" command will be used and on Windows platforms the "COPY" command will be used.

Examples:
    COPY PLOTCALIB.DAT TEMP.DAT
    COPY PLOTCALIB.DAT TEMP.DAT FOR I = 1 1 40
    COPY SYSTEM PLOTCALIB.DAT TEMP.DAT
Note:
    This command performs a line-by-line copy as oppossed to a an operating system command copy. The primary implication is that exactly 80 columns are copied to the new file. This means shorter lines are padded with blank spaces and that longer lines are truncated. The advantage is that this format allows partial copying of files. See Syntax 3 for invoking the appropriate operating system command to perform the copy.
Note:
    If <file2> already exists, it will be overwritten.
Note:
    The COPY command was re-defined 1994/06. In earlier implementations, it was used to activate the Tektronix hardcopy unit. As this device is now obsolete, no difficulties should be encountered by this re-definition.
Note:
    One of the files listed can be CLIPBOARD. That is, you can copy a file to the clipboard or you can copy the clipboard to a file.

    The clipboard capability is currently (2019/03) only supported on Windows platforms. The clipboard capability is not supported for the COPY SYSTEM syntax.

Default:
    None
Synonyms:
    None
Related Commands:
    LIST = Print the contents of the file.
    SEARCH = Search a file for a given string.
    EDIT = Edit a file.
    SYSTEM = Perform an operating system command.
Applications:
    File maintenance
Implementation Date:
    1994/06
    2014/12: Allow copying to or from the clipboard.
    2019/03: Added the COPY SYSTEM option
Program:
    XX

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 03/15/2019
Last updated: 03/15/2019

Please email comments on this WWW page to alan.heckert@nist.gov.