Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.


Zero-length files still have a computed MD5 value.The three 'duplicates' that FB's script found in my Desktop folder were unique text files with only a few words.
According to File Explore and using a DIR command, they were all zero bytes. But they are all different and should not have had
identical hashes.
PS C:\Users\GARLIN\Downloads> dir .\BOOT_TEST\ZERO
Directory: C:\Users\GARLIN\Downloads\BOOT_TEST
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 1/24/2025 11:42 PM 0 ZERO
PS C:\Users\GARLIN\Downloads> Get-FileHash -Path .\BOOT_TEST\ZERO -Algorithm MD5
Algorithm Hash Path
--------- ---- ----
MD5 D41D8CD98F00B204E9800998ECF8427E C:\Users\GARLIN\Downloads\BOOT_TEST\ZER
PS C:\Users\GARLIN\Downloads> .\FRIDAY.ps1
Please Enter a Directory Path to Scan: C:\Users\GARLIN\Downloads\BOOT_TEST
MD5: D41D8CD98F00B204E9800998ECF8427E
[1] "C:\Users\GARLIN\Downloads\BOOT_TEST\ZERO"
[2] "C:\Users\GARLIN\Downloads\BOOT_TEST\SUB\SUB2\ZERO"
Pick one of the files to delete, 'q' to quit:
The SHA256 hashing algorithm, slower than MD5 hashing algorithm, that is why i use the MD5 also my script works i don't how you are coming up with these results my script tested by many programmers not by just you no one find the script as not working, so problem is you.Ooops, I see FB used MD5 and ChatGPT used SHA256. Will try again.
MD5 also returns identical hashes for three non-identical, but small txt files.
You are the rude person by telling me that my script i have tested multiple times does not work and you are not programmer, how are you helping me. This not your first you did same with my other scripts all does not work for you for some reason also i don't need your help to learn i have two Discord servers full of programmers if i need help i will ask them.@FreeBooter
You are teaching yourself PS and I am trying to helpp by pointing out that your script is infallible, no need to be rude.
It does not work properly, as I have informed you. Let's leave it. It is not my intention to upset you. Bye.Do you know how my script works?
It works for me and others not for you, all my scripts does not work for you.It does not work properly, as I have informed you. Let's leave it. It is not my intention to upset you. Bye.
Name Length
---- ------
nuclear plans from around the world.wim 10,780,988,855
Sonnets About Travis Kelce.txt 2,394
Taylor Swift lyrics in Esperanto.txt 2,394
$FilesList = [System.Collections.ArrayList]@()
Get-ChildItem $path -Recurse -File | select FullName,LinkType,Target | foreach {
$File = $_
$FullName = $File.FullName
switch($_.LinkType) {
HardLink {
if ($FilesList -notcontains $File.Target) {
$FilesList += $FullName
}
else {
Write-Host "Skipping Hard Link: `"$FullName`""
}
}
SymbolicLink {
Write-Host "Skipping Symbolic Link: `"$FullName`""
}
default {
$FilesList += $FullName
}
}
}
www.elevenforum.com
do I have to edit that script to add the file name and path?Another consideration is there can be hard or symbolic links, which are duplicate files by design. You can use Get-ChildItem's LinkType & Target fields to check if they need to be excluded.
Code:$FilesList = [System.Collections.ArrayList]@() Get-ChildItem $path -Recurse -File | select FullName,LinkType,Target | foreach { $File = $_ $FullName = $File.FullName switch($_.LinkType) { HardLink { if ($FilesList -notcontains $File.Target) { $FilesList += $FullName } else { Write-Host "Skipping Hard Link: `"$FullName`"" } } SymbolicLink { Write-Host "Skipping Symbolic Link: `"$FullName`"" } default { $FilesList += $FullName } } }
Here's my updated version.do I have to edit that script to add the file name and path?
while (1) {
$Path = Read-Host "Please Enter a Directory Path to Scan"
if (-not (Test-Path -Type Container $Path)) {
Write-Host "Invalid directory path, please try again.`n"
}
else {
break
}
}
# Create array as type [System.Collections.ArrayList], so we can delete items from the list.
$FilesList = [System.Collections.ArrayList]@()
Get-ChildItem $Path -Recurse -File | select FullName,LinkType,Target | foreach {
$File = $_
$FullName = $File.FullName
switch($_.LinkType) {
HardLink {
if ($FilesList -notcontains $File.Target) {
$FilesList += $FullName
}
else {
Write-Host "Skipping Hard Link: `"$FullName`""
$Skipped = $true
}
}
SymbolicLink {
Write-Host "Skipping Symbolic Link: `"$FullName`""
$Skipped = $true
}
default {
$FilesList += $FullName
}
}
}
if ($Skipped) {
Write-Host ""
}
$HashList = [System.Collections.ArrayList]@(
$FilesList | foreach {
Get-FileHash -LiteralPath $_ -Algorithm MD5 | select Hash,Path
}
)
if (($HashList | Group-Object -Property Hash | Where-Object { $_.Count -gt 1 }).Count -eq 0) {
Write-Host "No duplicate files found."
exit 0
}
while (1) {
$FilenameList = @{}
$Index = 1
foreach ($Hash in ($HashList | Group-Object -Property Hash | Where-Object { $_.Count -gt 1 })) {
Write-Host "MD5: $($Hash.Name)"
foreach ($File in $Hash.Group.Path) {
Write-Host "[$Index] `"$File`""
# Build list of duplicated files, in numbered order
$FilenameList[$Index] = $File
$Index++
}
Write-Host ""
}
$Selection = Read-Host "Pick one of the files to delete, 'q' to quit"
if ($Selection -match 'q') {
break
}
else {
# Recast $Selection as integer to avoid problems later
$Selection = [int]$Selection
}
if ($Selection -lt 1 -or $Selection -ge $Index) {
Write-Host "$Selection is not valid, or out of range"
}
else {
$DeletedFile = $FilenameList[$Selection]
Write-Host "Deleting `"$DeletedFile`"`n"
Remove-Item $DeletedFile -Force
# Remove matching file from $HashList & $FilenameList arrays
$HashList = ($HashList | where { $_.Path -notmatch [regex]::Escape($DeletedFile) })
$FilenameList.Remove($Selection)
}
if ($FilenameList.Count -eq 1) {
break
}
}