I have tens of thousands of files with duplicated names separated by a space such as:
filename1 filename1.pdf
I need to get this to read
filename1.pdf
I have found this:
Dir | Rename-Item –NewName { $_.name –replace “ “,”_” }
There are many differences among these file name compositions (letters, numbers, characters, no spaces though, etc.)
I have not been able to find anything that uses wildcard to properly solve this.
Any help is greatly appriceated. I am really new to powershell and coding in general FYI.
Thank you!!