CDCheck 3.1.14.0 Help
Help version 1.2    Author: Mitja Perko Copyright (C) 2003-2008 Click here to view the online help
 
Command line parameters

Creating hash files / checking files from command line
CDCheck enables you to create hash files and check files without user intervention. That is especially useful in batch (.bat) files.

Use it as following:
CDCheck /xxx [/HF:filename] [/IMSF] [/IMRF] [/DRMH] [/DRMF] [/SaveReport:filename] [/O:filename] source_directory [reference_directory]
/xxx - can be one of the following:

/CRC[:HashType] - Create native CDCheck hash file with HashType algorithm (CRC-32,Adler32,MD2,...)
/SFV - Create SFV file (=> CRC-32 hash algorithm)
/MD5 - Create MD5 file (=> MD5 hash algorithm)
/CHECK - Check files with automatic hash detection

/COMPARE - Compare files (report all)
/O:filename - (optional) specifies the output filename of hash file - if this parameter is not specified default filename and directory is used (same as when using GUI, see Hash for more info)
/HF:filename - (optional) specifies custom hash file (/CHECK must be specified)
/DRMH - (optional) turns off reporting of missing hashes (/CHECK must be specified)
/DRMF - (optional) turns off reporting of missing files (/CHECK must be specified)
/IMSF - (optional) turns off reporting of missing files in source (/COMPARE must be specified)
/IMRF - (optional) turns off reporting of missing files in reference (/COMPARE must be specified)
/SaveReport:filename - (optional) saves results and messages to file (overwrites existing file without warning)
source_directory - directory for which to create a hash file/directory to check reference_directory - reference directory when comparing

Note! Parameter /xxx must be the first parameter to appear!

Note! If you are using long paths in parametere you should Quote that parameter (eg. "/SaveReport:C:\Program Files\Report.txt")!

Starting GUI in predefined mode
It is possible to start CDCheck in one of setups using command parameters.

Use it as following:
CDCheck /xxx source_directory
/xxx - can be one of the following:

/G - Starts CDCheck like normally with source_directory selected
/GHASH - Starts CDCheck with Hash setup shown and source set to source_directory
/GCHECK - Starts CDCheck with Check setup shown and source set to source_directory
/GCOMPARE - Starts CDCheck with Compare setup shown and source set to source_directory and reference set to reference_directory (optional)
/GRECOVER - Starts CDCheck with Recover setup shown and source set to source_directory

/CRF - Starts CDCheck and loads CRF file source_directory
source_directory - directory for which to create a hash file/directory to check/CRF file to load

Things you should know when using command line parameters
Calling CDCheck with above parameters will start CDCheck in background. There will be no visual output from the program! In case you are using batch files and wish the script to wait until CDCheck completes use command start (provided by the operating system) "Start /WAIT CDCheck [your parameters]".

CDCheck returns the following values with above use:
0 - successfully completed
1 - warnings present
2 - errors present
3 - unexpected error

Samples
Checking E drive and viewing returned error level

@echo off
start /wait cdcheck.exe /check "e:\"
echo Returned error level: %errorlevel%
goto a%errorlevel%
:a0
echo CDcheck sucessfully completed.
goto end
:a1
echo Warnings present.
goto end
:a2
echo Errors present.
goto end
:a3
echo Unexpected error.
:end
pause
Creating hash file
@echo off
start /wait cdcheck /CRC "E:\"
echo Returned error level: %errorlevel%

BACK  FRONT PAGE NEXT

Copyright (C) 2003-2008, Mitja Perko (CDCheck homepage)