Skip to content

Instantly share code, notes, and snippets.

@nonakap
Created May 21, 2013 05:49
Show Gist options
  • Save nonakap/5617714 to your computer and use it in GitHub Desktop.
Save nonakap/5617714 to your computer and use it in GitHub Desktop.
MD5
function GetMD5{
param($fileName)
$stream = New-Object IO.StreamReader $fileName
$md5 = [System.Security.Cryptography.MD5]::Create()
$hash = $md5.ComputeHash($stream.BaseStream);
$result = [System.BitConverter]::ToString($hash).Replace("-","").ToLower()
$result
}
date; Get-ChildItem ***ここにディレクトリを指定する*** -recurse | ?{ !$_.PSIsContainer } |
%{
echo ($_.Name + " " + (GetMD5 $_.FullName))
}; date;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment