Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>filecheck()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FILECHECK()

Syntax:     FILECHECK(<expC>)

Arguments:  <expC> denotes the name of the file to check.

Returns:    A numeric value.
            The check sum for the file denoted by <expC>.

Usage:      Use CHECKFILE() to establish if any changes have been
            made to a file, or if there are any read errors in the file.
            It is also possible to protect the hard drive against any simple
            virus (see example).

Notes:      The argument must be specified.  FILECHECK() returns -1
            as an error code if <expC> is ommitted or a file is specified that
            is not available.  It is allowed to use a drive designator and
            a path name, although no wildcards are allowed.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   IF FILECHECK("CUSTOMER.DBF") <> old_chksum
               ? "Beware! Data back-up necessary."
            ENDIF

            * OR:

            IF FILECHECK("C:\COMMAND.COM") <> cmd_chksum
               ? "COMMAND.COM changed.  Beware of virus."
            ENDIF




See Also: DISKCHECK()

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