I have tons of folders to rename. I would like to know how can i create a script to rename all of them following this rule:<\/p>\n
Advertisement
Name of actual folder: “AAA BBB - C D E”<\/p>\n
I want it to look like this: “AAABBB_CDE”<\/p>\n
How can i do it with powershell? or any other way.<\/p>\n
tried with .bat file but wasnt working how i want it, mostly cause of special characters.<\/p>","upvoteCount":6,"answerCount":4,"datePublished":"2021-01-04T12:27:59.000Z","author":{"@type":"Person","name":"castillo21","url":"https://community.spiceworks.com/u/castillo21"},"suggestedAnswer":[{"@type":"Answer","text":"
Hi everyone,<\/p>\n
I have tons of folders to rename. I would like to know how can i create a script to rename all of them following this rule:<\/p>\n
Name of actual folder: “AAA BBB - C D E”<\/p>\n
I want it to look like this: “AAABBB_CDE”<\/p>\n
How can i do it with powershell? or any other way.<\/p>\n
tried with .bat file but wasnt working how i want it, mostly cause of special characters.<\/p>","upvoteCount":6,"datePublished":"2021-01-04T12:27:59.000Z","url":"https://community.spiceworks.com/t/powershell-script-to-rename-multiple-folders/786281/1","author":{"@type":"Person","name":"castillo21","url":"https://community.spiceworks.com/u/castillo21"}},{"@type":"Answer","text":"
Welcome to the community. You would want to use the Rename-Item with the -replace parameter. This should get you started, but feel free to post back with questions as they arise.<\/p>\n