Tip

Command-line tool checks file integrity

Microsoft has released a freeware command-line tool called FCIV, short for File Checksum Integrity Verifier. The tool can be used to create cryptographic hashes or "fingerprints" for files. These hashes can later be used to validate the integrity

Requires Free Membership to View

of those files, which is useful if you're distributing archives of files and want to provide some means for the end user to verify that they are both intact and legitimate.

You can also accomplish this with other tools. The popular file-compression utility WinRAR, from win.rar GmbH, for instance, automatically computes and stores 32-bit cyclic redundancy check (CRC) information for every file in an archive. However, the Microsoft tool has several advantages over WinRAR as far as checksumming.

FCIV can create hashes using MD5 or SHA-1 cryptography, which are generally of better precision than a simple 32-bit CRC. In addition, the program can take the generated checksums and export them to an XML file (which can, in turn, be imported into a database or stored as is) for record keeping, with the hex values for the hash stored in a base64-encoded format. You can, in turn, run FCIV against a group of files in a directory to verify that their hash values match the results in a given database.

You can also run the program recursively against a given directory tree with exclusion data so that specific directories are not hashed or checked or so that only files that match a specific extension or wildcard are checked. The program returns standard command-line error codes, so the hashing is done as part of a batch operation and the results evaluated elsewhere. One possible application for the program is to generate a hash database for a list of sensitive files -- such as system files -- and compare the files themselves against the hash list to make sure nothing's been changed.

Keep in mind that while the tool is free, it's also completely unsupported: You use it strictly at your own risk.

 


Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!


This was first published in August 2005

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.