Hello,
I have a big folder with loads of folders in them and some folders contain corrupted extensions, they look like the following: .pdf_... or .xls___...
I'm trying to change the extensions because when i manually change the extension the files seem to work perfectly fine.
I've tried the following lines:
Get-ChildItem -Recurse -filter ".xls_" | Rename-Item -NewName { [io.path]::ChangeExtension($.name, ".xls") }
Get-ChildItem -Recurse -filter "*.pdf*" | Rename-Item -NewName { [io.path]::ChangeExtension($_.name, ".pdf") }
but i keep on getting the same error:
Cannot rename item at '...' does not exist.
I've just done some googling trying to match the pieces of the puzzle. I am not familiar with using Powershell.
Can someone help me find a solution?