Menu

How to get the bare hash value of the "7z t -scrcsha1" output?

Help
2015-01-22
2015-01-23
  • Chris Raston

    Chris Raston - 2015-01-22

    I'm archiving a lot of single files into their own respective 7-zip archives. These files each have their own SHA-1 hash in a text file. I run a batch script to archive each file, then run the "7z t -scrcsha1" and output the result to a text file.
    Here is a sample of what one of the output files would look like:

    C:\temp>7z t -scrcsha1 7zFM.7z

    7-Zip 9.35 beta  Copyright (c) 1999-2014 Igor Pavlov  2014-12-07
    
    Processing archive: 7zFM.7z
    
    Testing     7zFM.exe
    
    Everything is Ok
    
    Size:       466432
    Compressed: 175392
    
    SHA1   for data:              1C0396C444330298221DFBEB7FFDE9F43A2B7B2B
    
    Kernel  Time =     0.000 =    0%
    User    Time =     0.078 =   41%
    Process Time =     0.078 =   41%    Virtual  Memory =      3 MB
    Global  Time =     0.187 =  100%    Physical Memory =      4 MB
    

    I then want to compare the original hash file against the one created using "7z t". However, as you can see from the contents of the file above, there is a lot of stuff in there I don't need. I just need the actual SHA1 code for the individual file in the archive.

    Is there an extra command that can just give me the bare SHA-1 hash? This makes it easier for me to do a comparison between the 2 text files.

     
  • Igor Pavlov

    Igor Pavlov - 2015-01-23

    Now there there is no option for such feature.

     

Log in to post a comment.

MongoDB Logo MongoDB