Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnetcopy()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETCOPY()
 Copies files within a Novell file server
------------------------------------------------------------------------------
 Syntax

     NNETCOPY(<cSourceFile>,<cTargetFile>,[<nBytes>])
        --> nCopiedBytes

     Netware: 2.2 and 3.11

 Arguments

     <cSourceFile>  Designates the name of the file that is copied.  This
     parameter can contain the drive and path designation but must be
     resident on a network drive.

     <cTargetFile>  Designates  the name of the target file that is
     created.  This parameter can contain the drive and path designation but
     must be resident on a network drive.

     <nBytes>  Designates the number of bytes that are copied.  The
     default value designates the entire file.

 Returns

     NNETCOPY() returns the number of bytes copied.  If a copy did not occur,
     the function returns -1.

 Description

     NOVELL NET COPY
     This function was planned specifically for copying files within a Novell
     file server.  The copy speed is very high because the file content is
     copied within the server and is not transmitted over the network.  In
     this way the function corresponds to the Novell NCOPY utility program.

 Notes

     .  If the size of the file that is copied is already known,
        (through FILESEEK()/FILESIZE()), you should pass that size as the
        third parameter.  The function then does not have to determine the
        size of the source file and the copy speed is quicker.

     .  Notice that the source and target file must be resident on
        network drives on the same file server.  You cannot copy to or from
        hard disks or floppies, or copy between different servers.
        FILECOPY() must be used for all other file copying.

     .  Distinctions can be made based on the source of the error
        through ERRORCODE() (source file not found; target file cannot be
        created) or through NNETERROR() (different file servers).

 Examples

     .  Drive J: is mapped on a Novell server.  Copy a file, giving
        the source and target path:

        NNETCOPY("J:\SUPPORT\TEST.EXE", "J:\USER\TEST2.EXE")

     .  FILECOPY() is a simple method of copying a file every time.
        If you cannot copy with NNETCOPY(), use FILECOPY():

        IF FILE(cFileName)
           IF NNETCOPY(cFileName, cTargetFile) = -1
              FILECOPY(cFileName, cTargetFile)
           ENDIF
           IF ERRORCODE(.T.) = 0
              ? "File copied successfully!"
           ENDIF
        ENDIF

See Also: NNETERROR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson