FileCCont

FileCCont

Copies sections of a file in backup mode

Syntax

      FileCCont(<cFile>) --> <nCopyByte>

Argument

<cFile> : The file name for the target file.

Returns

<nCopyByte> : number of bytes copied

Description

FILE COPY CONTINUE

Use this function primarily after a FileCopy(). As much as possible of the remaining data is written to a new disk. If the remaining data still does not fit on the designated target disk, call this function repeatedly until it writes all the remaining data. Each time you call FileCCont(), a new name can be designated for the target file. These files are then numbered consecutively (see Examples).

Notes

. If a copy procedure on multiple disks terminates for any reason, call FileCClose().

. Use SETFCREATE() to designate an attribute to form a new file.

. The function acknowledges the CSETSAFETY() implementation, as does FileCopy()

Example

      . Show a back up with FileCopy().  After terminating, close the source
      file:

      FileCopy(cSource, cTarget, .T.)   // Back up mode
      DO NEXTDISK                       // When terminated  Terminated = .T.
      DO WHILE FILECOPEN() .AND. .NOT. Terminated
         FileCCont(cTarget)             // Next disk, new name
         DO NEXTDISK                    // Request for disk exchange
      ENDDO
      IF Terminated
         FileCClose()                   // Close source file!
      ENDIF

Seealso

FileCopy(), FileCOpen(), FileCClose(), FileCDaTi()

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s