Tesla Posted March 21, 2016 Posted March 21, 2016 Hi All Looking for a good (and free....) program to find and remove duplicate files from Server? Any recommendations? Thanks
Tesla Posted March 21, 2016 Author Posted March 21, 2016 Alas, Server 2008 here still...should of posted there really....sorry
Geoff Posted March 21, 2016 Posted March 21, 2016 (edited) Poking around in my bag of tricks yields: workflow Find-Duplicates { [CmdletBinding()] param ( [parameter(Mandatory=$True)] [string]$Path ) if (!(Test-Path -PathType Container $Path)) { Write-Error "Invalid path specified." Exit } $LogFile="c:\temp\results.csv" $CheckpointFile="c:\temp\check.txt" Write-Verbose "Scanning Path : $Path" $Files=gci -File -Recurse -path $Path | Select-Object -property FullName,Length $MatchedSourceFiles=@() ForEach ($SourceFile in $Files) { Write-Verbose "Source : $($SourceFile.FullName)" [array]$MatchedSourceFiles=InlineScript { $MatchedFiles=@() $CurrentMatches=$Using:MatchedSourceFiles $MatchingFiles=$Using:Files |Where-Object {$_.Length -eq $Using:SourceFile.Length} Foreach ($TargetFile in $MatchingFiles) { Write-Verbose "Checking File $($TargetFile.FullName)" ($CurrentMatches | Select-Object -ExpandProperty File) | % {Write-Verbose "List1 : $_"} if (($Using:SourceFile.FullName -ne $TargetFile.FullName) -and !(($CurrentMatches | Select-Object -ExpandProperty File) -contains $TargetFile.FullName)) { Write-Verbose "Matched $($Using:SourceFile.FullName) and $($TargetFile.FullName)" if ((fc.exe /A $Using:SourceFile.FullName $TargetFile.FullName) -contains "FC: no differences encountered") { Write-Verbose "Match found." $MatchedFiles+=$TargetFile.FullName } } } if ($MatchedFiles.Count -gt 0) { Write-Verbose "Found Matching Files. Adding Object." $NewObject=[pscustomobject][ordered]@{ File=$Using:SourceFile.FullName MatchingFiles=$MatchedFiles } $CurrentMatches+=$NewObject } $CurrentMatches } Checkpoint-Workflow } $MatchedSourceFiles | Export-CSV $LogFile -NoTypeInformation } Edited March 21, 2016 by Geoff 1
6Foot2 Posted March 21, 2016 Posted March 21, 2016 A quick search turned this up: Link: RayburnSoft.net - Duplicate Commander 3.2.5448 Version 3.0 has multiple known issues, crashes, bugs, etc. The current beta version has progressed a lot since the last stable released over 2 years ago, and I've gotten nothing but positive feedback from it. It is highly recommended that you use the current beta. Duplicate Commander is a freeware application that allows you to find and manage duplicate files on your PC. Duplicate Commander comes with many features and tools that allow you to recover your disk space from those duplicates... System Requirements: Windows 2000SP3/XP/2003/Vista/2008/7/8 256 MB of RAM (1 GB recommended) Pentium II 500 MHz processor 1 MB of hard drive space .NET Framework 2.0 (automatically installed on Vista and newer) http://www.rayburnsoft.net/images/dcfull.png
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now