Skip to content

Instantly share code, notes, and snippets.

@kayra1
Created May 16, 2025 20:49
Show Gist options
  • Save kayra1/e4872262463bf297e54dbfe1b444ce35 to your computer and use it in GitHub Desktop.
Save kayra1/e4872262463bf297e54dbfe1b444ce35 to your computer and use it in GitHub Desktop.
Remove all clashes from Proton Drive
# Proton Sucks at reinitializing an existing folder.
# While it can tell that the file is the same, it will still create a duplicate
# file with the string "(# Name clash ...)" appended to the name for "safety"
# even though a file with the same data and metadata MUST be identical.
# This script cleans out the crap with Name clash in it.
# Set the root folder where the Proton Drive sync is located
$rootPath = "C:\Path\To\Your\ProtonDrive"
# Find and delete all files with "Name clash" in the name
Get-ChildItem -Path $rootPath -Recurse -File | Where-Object {
$_.Name -like "*Name clash*"
} | ForEach-Object {
Write-Host "Deleting: $($_.FullName)"
Remove-Item $_.FullName -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment