LITIGATION SUPPORT TIP OF THE NIGHT

night.png
aceds.png

Featured on the ACEDS blog. 

HOME

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer. All content provided on this blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information. This policy is subject to change at any time.  The owner is not an attorney, and nothing posted on this site should be construed as legal advice.   Litigation Support Tip of the Night does not provide confirmation that any e-discovery technique or conduct is compliant with legal, regulatory, contractual or ethical requirements.  

Outlook-vlcajcc4.jpg

See my post on Running Regex Searches With a Grep Utility on the ILTA litigation support blog.

New tips for paralegals and litigation support profesionals are posted to this site each week.  Click on the blog headings for better detail.

  • YouTube Social  Icon
See How-To Videos on my  YouTube channel.

Join our mailing list

    Avenir Light is a clean and stylish font favored by designers. It's easy on the eyes and a great go to font for titles, paragraphs & more.

    • All Posts
    • PARALEGAL
    • Forensics
    • eDiscovery Law
    • Mobile Devices
    • Excel
    • Electronic Discovery
    • Hardware
    • Security
    • Hash Values
    • Databases
    • Software
    • File Headers
    • Windows
    • Outlook
    • Graphics
    • Safe Harbor
    • Word
    • Web browsers
    • Social Media
    • Windows commands / batch files
    • Processing
    • Text Editors
    • Technology Assisted Review
    • FRCP
    • Data Storage
    • Redaction
    • Searching
    • Collection
    • Data Transfers
    • Adobe Acrobat
    Search
      • Dec 12, 2020

    PowerShell Script to compare the hash values of multiple files

    You can use the below PowerShell script to compare the hash values of multiple pairs of files.


    Begin by giving each path for each file in your data set a unique name.

    $file1 = "C:\foofolder\set1\analysis.xlsx”

    $file2 = "C:\foofolder\set2\analysis.xlsx"

    $file3 = "C:\foofolder\set1\Memo.docx”

    $file4 = "C:\foofolder\set2\Memo.docx"

    $file5 = "C:\foofolder\set1\Show1.pptx”

    $file6 = "C:\foofolder\set2\Show1v2.pptx"


    . . . then prepare lines comparing the hash of the first file to the second file:


    if((Get-FileHash $file1).hash -ne (Get-FileHash $file2).hash)


    . . . . you can parse through your data on an Excel spreadsheet like this:




    . . . using a formula to number the files side by side. Copy the lines to a text editor and remove the resulting tabs, putting each line of script on a new line as necessary.


    The script will give you a list of which files are same and which are different in the same order in which they are listed in the script.





    $file1 = "C:\foofolder\set1\analysis.xlsx”

    $file2 = "C:\foofolder\set2\analysis.xlsx"

    $file3 = "C:\foofolder\set1\Memo.docx”

    $file4 = "C:\foofolder\set2\Memo.docx"

    $file5 = "C:\foofolder\set1\Show1.pptx”

    $file6 = "C:\foofolder\set2\Show1v2.pptx"

    if((Get-FileHash $file1).hash -ne (Get-FileHash $file2).hash)

    {“files are different”}

    Else {“Files are the same”}

    if((Get-FileHash $file3).hash -ne (Get-FileHash $file4).hash)

    {“files are different”}

    Else {“Files are the same”}

    if((Get-FileHash $file5).hash -ne (Get-FileHash $file6).hash)

    {“files are different”}

    Else {“Files are the same”}



    See the post by Dr. Scripto here.

    • Hash Values
    • •
    • PowerShell
    195 views0 comments
      • May 8, 2020

    certutil command to generate hash values for multiple files


    The Tip of the Night for December 5, 2015, discussed how to use the certutil command in Windows to generate a hash value for a specific file. You can also use the below script, first posted here, to generate a list of hash values for multiple files in a single folder

    for %F in (*) do @certutil -hashfile "%F" MD5 | find /v "hashfile command completed successfully" >>list.txt

    After entering command prompt, use the cd command to change the directory to the folder containing the files you need to process. Simply enter this script and then press return. A new file will be generated like this:

    certutil can also generate SHA1 and SHA256 hash values. Sadly, this script as written will not give you the hash values for the files saved in subdirectories.


    • Hash Values
    • •
    • Windows commands / batch files
    2,008 views0 comments
      • May 6, 2020

    PowerShell Script to Get Hash Values of Multiple Files in Multiple Folders


    Here's a PowerShell script that you can use to get the MD5 hash values of multiple files that are in a directory with multiple levels of subfolders:

    PS C:\Users\SeanKOShea> Get-FileHash -Algorithm MD5 -Path (Get-ChildItem "C:\FooFolder\baseball2\*.*" -Recurse -force) | export-csv c:\FooFolder\Batch01b.csv

    The Get-FileHash algorithm can be set to generate MD5, SHA1 and other hash values. Follow this command with the folder containing your source files. This will work even if the files are saved in multiple subdirectories, thanks to the, 'Recurse -force'. Enter a pipe | and then use the export-csv command to output the results to a comma separated value file.

    The .csv file that is generated will look like this:

    This PowerShell script will work if you list different directories in multiple copies of this one line script, put them on separate lines in PowerShell, and run them all at once.


    • PowerShell
    • •
    • Hash Values
    8,721 views0 comments
    1
    2345

    Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

    ​

    The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

    ​

    If you have a question or comment about this blog, please make a submission using the form to the right. 

    Your details were sent successfully!

    © 2015 by Sean O'Shea . Proudly created with Wix.com