Skip to content

Commit 6d4cae7

Browse files
committed
v2.2
1 parent 2d4b25b commit 6d4cae7

20 files changed

+0
-35
lines changed

PSOneTools/2.1/Get-PSOneFileHash.ps1 renamed to PSOneTools/2.2/Get-PSOneFileHash.ps1

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -251,38 +251,3 @@
251251
return $result
252252
}
253253
}
254-
return
255-
$stopwatch = [Diagnostics.Stopwatch]::StartNew()
256-
257-
$stopwatch.Reset()
258-
$stopwatch.Start()
259-
$data = Get-ChildItem -Path $env:USERPROFILE\Downloads -File |
260-
Get-PsOnePartialFileHash -StartPosition 1KB -Length 1MB -BufferSize 1MB -AlgorithmName SHA1
261-
$stopwatch.Stop()
262-
263-
$result = $data | Group-Object -Property Hash, Length | Where-Object Count -gt 1
264-
$duplicates = $result.Count
265-
$result | ForEach-Object {
266-
$_.Group | Select-Object -Property Length, Hash, Path
267-
} |
268-
Out-GridView -Title 'Partial Hash'
269-
270-
$seconds = $stopwatch.ElapsedMilliseconds/1000
271-
'partial hashing took {0:n1} secs. Identified duplicates: {1}' -f $seconds, $duplicates
272-
return
273-
$stopwatch.Reset()
274-
$stopwatch.Start()
275-
$data = Get-ChildItem -Path $env:USERPROFILE\Downloads -File |
276-
Get-PsOnePartialFileHash -Force -AlgorithmName SHA1
277-
$stopwatch.Stop()
278-
279-
$result = $data | Group-Object -Property Hash, Length | Where-Object Count -gt 1
280-
$duplicates = $result.Count
281-
$result | ForEach-Object {
282-
$_.Group | Select-Object -Property Length, Hash, Path
283-
} |
284-
Out-GridView -Title 'Full Hash'
285-
286-
$seconds = $stopwatch.ElapsedMilliseconds/1000
287-
'full hashing took {0:n1} secs. Identified duplicates: {1}' -f $seconds, $duplicates
288-
File renamed without changes.

0 commit comments

Comments
 (0)