Ветеран
Сообщения: 27449
Благодарности: 8087
|
Профиль
|
Отправить PM
| Цитировать
Пробуйте:
читать дальше »
Код: 
function GetMD5Hash([System.String]$sFile) {
$oHashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("MD5")
$oStreamReader = ([System.IO.StreamReader]$sFile).BaseStream
-join ($oHashAlgorithm.ComputeHash($oStreamReader) | ForEach-Object -Process { "{0:x2}" -f $_ })
$oStreamReader.Close()
}
$sRootPath = "E:\Песочница\0328"
$sMD5ListPath = "E:\Песочница\0336\MD5 List.txt"
"; Generated on $(Get-Date)" | Out-File -FilePath $sMD5ListPath -Encoding Unicode
Get-ChildItem -Path $sRootPath -Recurse |`
Where-Object -FilterScript { -not $_.PSIsContainer -and "Thumbs.db", "Descript.ion" -notcontains $_.Name } |`
ForEach-Object -Process {
"$(GetMD5Hash $_.FullName)`t$($_.FullName.Substring($sRootPath.Length + 1))"
} | Out-File -FilePath $sMD5ListPath -Encoding Unicode -Append
|
Отправлено: 19:11, 17-12-2013
| #8
|