Created
May 16, 2025 20:49
-
-
Save kayra1/e4872262463bf297e54dbfe1b444ce35 to your computer and use it in GitHub Desktop.
Remove all clashes from Proton Drive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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