Batch delete duplicate words in file name the code is posted in the this post, but it does not work with me Deleting repeated parts of a file name?
Get-ChildItem -Path .\* -File -Recurse | ForEach-Object {
Rename-Item $_ -NewName ((($_.Basename.Split("_") | Select-Object -Unique) -Join "_") + $($_.Extension))
}