Created
May 21, 2013 05:49
-
-
Save nonakap/5617714 to your computer and use it in GitHub Desktop.
MD5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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