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>nnetsalvag()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETSALVAG()
 Recovers the files marked for deletion
------------------------------------------------------------------------------
 Syntax

     NNETSALVAG(<cOldFile>,[<cNewFile>]) --> cFile

     Netware: 2.2 and 3.11

 Arguments

     <cOldFile>  Designates the file that is marked for deletion, but
     depends on the Netware version used.

     Under Netware 3.x, <cFile> designates the file that is  recovered.  The
     file name can contain a path, but the path must be unique.  Wildcard
     characters are not allowed.

     Under Netware 2.x, the operating system only permits files to be
     salvaged sequentially for the entire volume.  If NNETSALVAG() determines
     that the server is running under Netware 2.x after a server change is
     implied by <cOldFile>, only the volume definition from the remaining
     part of <cOldFile> is taken into account.  The first recoverable file is
     salvaged.

     <cNewFile>  Designates the name under which <cOldFile> is recovered.
     This parameter is only taken into account if the function is called on a
     Netware 3.x server.  <cNewFile> can only contain a file name (an eight-
     character name, and a three-character extension).

 Returns

     NNETSALVAG() returns the name of the file that is recovered.  If an
     error occurs, the function returns an empty string.

 Description

     NOVELL NET SALVAGE
     Files on a server volume that are deleted within DOS or within an
     application are logically marked for deletion.   These files can be
     recovered with the function NNETSALVAG().  The function is supported
     differently under Netware 2.x and 3.x.  Under Netware 3.x, files can be
     salvaged individually.  Under Netware 2.x, only the first recoverable
     file of the current user on the related volume is salvaged.  Files
     cannot be recovered individually under Netware 2.x.

 Examples

     .  Salvage the file CLIENT.DBF on a Netware 3.x server:

        NNETMAP('L','FSERVER386/SYS:DATA')

        NNETSALVAG('L:CLIENT.DBF')

     .  Salvage all recoverable files in the directory L:\DATA:

        #include "ctnnet.ch"

        aFiles=NNETSALLST('L:\DATA')

        FOR i=1 TO LEN(aFiles)
           NNETSALVAG('L:\DATA\'+aFiles[i,SAL_NAME])
        NEXT i

     .  Salvage all the files of the current user on volume SYS: of a
        Netware 2.x server:

        WHILE .T.
           IF EMPTY(cFile:=NNETSALVAG('FSERVER286/SYS:'))
              EXIT
           ENDIF
           ? cFile
        ENDDO

See Also: NNETPURGE() NNETSALLST()

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