Program: IFCRC.EXE / Author: David Bennett / Date: 3-17-88 / Version: 1.0 Description: Compiled using Borland's Turbo Pascal 4.0 compiler. This program is for use in a batch file. It allows you to execute commands based on whether or not a certain file matches the given CRC value. The program can also be used to check the CRC value of a file. Although I primarily wrote this program to execute a certain command based on whether a file has been altered or not, It could also be used to check a daily transfer from a remote site or even used to check for computer viruses. I herby release this program to the public domain (Guilt FreeWare!) Usage: IFCRC {NOT} {Dec/$Hex CRC} {DOS Command} {Dos Command...} * If only is supplied then the CRC for that filename will be displayed on the CRT. * If the NOT operator is specified then the DOS command will be executed if the CRC of does not match that of the CRC on the command line. * The CRC will default to a decimal number. If a '$' preceedes the number it will be interpreted as a hexidecimal number. Examples: IFCRC IFCRC.EXE This command will return the CRC value of the file IFCRC.EXE in Hexdecimal and Decimal notation. IFCRC WHATSUP.DOC $CD34 TYPE WHATSUP.DOC | MORE If the CRC of the file WHATSUP.DOC is $CD34 (Hexidecmal) then the file will be displayed on the screen one page at a time. IFCRC HODEE.DOE NOT 12345 ECHO An error has occured! If the CRC of the file HODEE.DOE does not equal 12345 (Decimal) then an error message will be displayed to the screen. This command will also execute is the file HODEE.DOE does not exist! About CRC (Cyclic Redundancy Check): CRC stands for Cyclic Redundancy Check. It is based on the CCITT standard algorythm: X^16 + X^12 + X^5 + 1. CRC is used primarily to check file transfers to make sure they where made sucessfully. Some error checking protocols (I.E. Xmodem CRC) do this automattically with each block of data transfered. The CRC of any block of text is a number 16-bit binary number. This makes it very unlikely (1 chance in 65536) that two different files have the same CRC value. Therefore to guard against one of your systems crucial files being altered, you can use IFCRC to control processing based on the integrity of any file. Error Messages: Message: Description: -------------------------- ------------------------------------ Bad character in CRC value The given CRC is not a valid number. Check to make sure the proper command line syntax was used. DOS command expected IFCRC.EXE could not find a DOS command supplied on the command line. Check syntax. File not found! The supplied filename could not be opened. This error will only be displayed when using IFCRC to display the CRC of a given file. The Author: David Bennett Bennett Software Solutions 151 West Geospace Drive Indepedence, MO 64056. CompuServe ID: 74635,1671