exf command line usage
Usage: exf [OPTIONS] [HASH METHOD(s)] [FILE(s)]
Options:
-r Recurse subdirectories
-d PATH Set working directory
-otf FILE Output to file instead of console (deletes file if exists)
-c FILE Use digest file to test files, report errors only
-cv FILE Use digest file to test files, verbose (report every file)
-mt N Set maximum hash threads to N
-omd5 Output style: md5sum (default)
-ofcmd5 Output style: FILECHECKMD5
-osfv Output style: Simple File Verification (defaults to -crc32 hash)
-osha1 Output style: sha1sum (defaults to -sha1 hash)
-fp Output includes full paths.
-md5sum Same as <exf -r -otf exactfile.md5 -omd5 -md5 *.*>
-license Output exf EULA.
Hash methods: (defaults to -md5, except for -osfv, -osha1)
-adler32
-crc32
-md2
-md4
-md5
-sha1
-sha256
-sha384
-sha512
-ripemd128
-ripemd160
-tiger128
-tiger160
-tiger192
-gost
Notes:
Maximum hash threads: exf defaults to 1 for written CD media. Otherwise, the
number of processor cores is used, up to 16. exf will never use more than 16
hash threads even if more is specified with -mt.
When -c is specified, the working directory is set to the location of the
digest file unless -d is specified.
Using -otf will erase the output file specified if it already exists. Using
this option ensures that the digest file being created will not be a part
of the digest itself.
-md5sum creates a digest file named "exactfile.md5" in the working directory,
using the md5 hash method, with recursive subdirectory scanning of all files.
Only -mt and -d are valid options when -md5sum is used.
You can redirect console output to a file by appending > filename.txt to the
command line. Note that if you redirect output to a file in the scanning
path when creating a digest, and the file name matches the scanning file
mask, an non-fatal error will be included in the digest file because exf
will attempt to hash the output file while it is still being written.
To avoid this, use the -otf FILE option.
For more information on exf output formats see www.ExactFile.com.
Examples:
exf -c sums.md5 -d C:\temp
Tests files in digest file "sums.md5" (loads sums.md5 from current
directory); assumes the files listed in the digest are in C:\temp.
exf -c sums.md5
Tests files in digest file "sums.md5"; assumes both the digest file and the
files listed in the digest file are in the current directory.
exf -c C:\temp\sums.md5
Tests files in digest file "C:\temp\sums.md5"; assumes the files listed in
the digest file are in the same folder as the digest file (C:\temp)
exf -md5sum
Creates a digest file in the current directory named "exactfile.md5" using
the md5 hash method with recursive subdirectory scanning of all files of
the current directory.
exf -md5sum -d C:\temp
Like above, but creates digest file "C:\temp\exactfile.md5" and scans files
and subdirectories C:\temp
exf -r -otf tempsums.md5 -d C:\temp *.txt *.exe
Creates digest file "tempsums.md5" in C:\temp, scanning all of the files
matching "*.txt" and "*.exe" in C:\temp and all subdirectories.
exf -r -otf "C:\sums folder\tempsums.md5" -d C:\temp *.txt *.exe
Same as above, but writes digest file to "C:\sums folder" instead.
exf -crc32 -sha1 -md5 -gost myfile.zip
Output CRC32, SHA1, MD5, and GOST hashes for myfile.zip in the current
directory. Uses md5sum output format.
Does the exf send eny error codes?
With this command i liked it to print “0″ if all is ok?
for /F “delims=” %i IN (‘dir /s /b **.sfv’) DO @exf -c “%~fi” | @echo %errorlevel%
Goal is to move complete/checked folders to another directory…
Great tool by the way, using this and md5deep/hashdeep
@rudis
Found the basic part my self!
(for /F “usebackq delims=” %i IN (`dir /s /b *Arome*.sfv`) DO @(@exf -c %~fi | find /I “No errors”) && @echo %~fi) | FIND /I /V “No error”
This command pick out all sfv-files that are ok!
Put that in a FOR loop and you can easy move the files…
I’ve created a Windows Powershell script that recurses it’s way down the directory tree creating a hash file for each individual directory. It only creates a file if there is one missing, the hash file is not the most recent in the directory, the directory has been modified or if the count of items in the hash file does not match the number of files in the directory.
Once I’ve done some more testing I’ll post the code publically.
In testing I’ve found that the command line and app finish the file differently. The app finishes with the number of files hashed, whereas the commandline doesn’t. If the command line had the number of files, checking would be better.
Great tool with MD5 for validating backup files on an exrernal HD. Many thanks. BUT I only need CRC32 and cannot generate the relevant SFV checksum file. I’ve tried nearly all combinations of your options — but in vain. I simply have a folder (say, C:\My Folder) for which I want to generate a CRC32 checksum file recursively stepping through all subdirectories, then, after copying the folder with the newly created checksum to the external HD folder (say, H:\My Folder), to check the copied checksum against the copied folder files. Your example works well for -md5sum but I can’t break it down into its component parts in a way that works and that I can then ‘convert’ to CRC. Can you please help?