Remove character from file name in powershell

Question:

I’m new to powershell and wanted to know if there’s a way to remove a character from a file name. The character I’m trying to remove is a dash “-” and sometimes there are 2 or 3 dashes in the file name. Is it possible to have it rename files that have a dash in them?

Answer:


This question may be more suitable for SuperUser.

Source:

Remove character from file name in powershell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply