Copy a file to a new file or to a device

     COPY FILE <xcSourceFile> TO <xcTargetFile>|<xcDevice>


     <xcSourceFile> is the name of the source file to copy including the

     <xcTargetFile> is the name of the target file including the

     Both arguments can be specified as literal file names or as character
     expressions enclosed in parentheses.  COPY FILE supplies no default

     <xcDevice> is the name of the device where all subsequent output
     will be sent.  You can specify a device name as a literal character
     string or a character expression enclosed in parentheses.  Additionally,
     a device can be either local or network.  If you COPY TO a non-existing
     device, you create a file with the name of the device.  When specifying
     device names, do not use a trailing colon.


     COPY FILE is a file command that copies files to and from the Clipper
     default drive and directory unless you specify a drive and/or path.  If
     the <xcTargetFile> exists, it is overwritten without warning or error.


     .  This example copies a file to a new file and then tests for
        the existence of the new file:

        COPY FILE Test.prg TO Real.prg
        ? FILE("Real.prg")                  // Result: .T.

 Files   Library is EXTEND.LIB.


4 responses to “C5_COPY FILE

  1. Pingback: C5_TYPE | Viva Clipper !

  2. Pingback: C5_RENAME | Viva Clipper !

  3. Pingback: C5 File Management | Viva Clipper !

  4. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.