CT_FILECOPEN

 FILECOPEN()
 Tests to see if the file is still open in the backup mode

 Syntax

     FILECOPEN() --> lOpenFile

 Returns

     FILECOPEN() returns .T. when all data is not copied during a  FILECOPY()
     or FILECCONT().

 Description

     FILE COPY OPEN
     FILECOPEN() determines whether all data is copied.  This concerns the
     source file, which is specified when the FILECOPY() function is called.
     FILECOPEN() returns .T. until all the data in the source file is read,
     whether by FILECOPY or the follow-on function FILECCONT()

 Note

     .  If you must abort the copy process, and FILECOPEN() continues
        to returns .T., use FILECCLOSE().

 Examples

     Show a back up with FILECOPY():

     nCounter   := 1                   // "BIG.001" etc.
     cTargetFile   := "BIG" + NTOC(nCounter, 10, 3, "0")
     FILECOPY("BIG.DBF", "A:\" + cTargetFile, .T.)
                                       // Back up mode
     DO WHILE FILECOPEN()
        DO NEXTDISK                    // Request disk change
        nCounter     := nCounter + 1
        cTargetFile  := "BIG" + NTOC(nCounter, 10, 3, "0")
        FILECCONT(cTargetFile)         // Next disk - new name

     ENDDO
     FILECCLOSE                        // For safety


See Also: FILECOPY() FILECCONT() FILECCLOSE()

 

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.