Skip to content

Commit

Permalink
v2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasPSP committed Apr 9, 2020
1 parent 2d4b25b commit 6d4cae7
Show file tree
Hide file tree
Showing 20 changed files with 0 additions and 35 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -251,38 +251,3 @@
return $result
}
}
return
$stopwatch = [Diagnostics.Stopwatch]::StartNew()

$stopwatch.Reset()
$stopwatch.Start()
$data = Get-ChildItem -Path $env:USERPROFILE\Downloads -File |
Get-PsOnePartialFileHash -StartPosition 1KB -Length 1MB -BufferSize 1MB -AlgorithmName SHA1
$stopwatch.Stop()

$result = $data | Group-Object -Property Hash, Length | Where-Object Count -gt 1
$duplicates = $result.Count
$result | ForEach-Object {
$_.Group | Select-Object -Property Length, Hash, Path
} |
Out-GridView -Title 'Partial Hash'

$seconds = $stopwatch.ElapsedMilliseconds/1000
'partial hashing took {0:n1} secs. Identified duplicates: {1}' -f $seconds, $duplicates
return
$stopwatch.Reset()
$stopwatch.Start()
$data = Get-ChildItem -Path $env:USERPROFILE\Downloads -File |
Get-PsOnePartialFileHash -Force -AlgorithmName SHA1
$stopwatch.Stop()

$result = $data | Group-Object -Property Hash, Length | Where-Object Count -gt 1
$duplicates = $result.Count
$result | ForEach-Object {
$_.Group | Select-Object -Property Length, Hash, Path
} |
Out-GridView -Title 'Full Hash'

$seconds = $stopwatch.ElapsedMilliseconds/1000
'full hashing took {0:n1} secs. Identified duplicates: {1}' -f $seconds, $duplicates

File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6d4cae7

Please sign in to comment.