Sunday, July 3, 2011

Using the File Checksum Integrity Verifier (fciv.exe) to ensure file integrity

The File Checksum Integrity Verifier (fciv.exe) can be used to calculate and verify that file contents have not changed.


Calculating Hashes

The following PowerShell command line will calculate the hashes for the current folder and all subfolders, saving the results into ..\Hashes.xml.

fciv -add (resolve-path .) -bp (resolve-path .) -r -xml ..\Hashes.xml -sha1

Verifying Hashes

The purpose of calculating a hash is to compare it at a later date to see whether the file has changed or not.


Use the following command to list all the hashes in the databases.

fciv.exe -list -xml ..\Hashes.xml -sha1

This command will verify the file content.

fciv.exe -v . -r -xml ..\Hashes.xml -sha1

0 comments:

Post a Comment