Created
August 28, 2015 03:04
-
-
Save ethangardner/22479f7e8d0c09284547 to your computer and use it in GitHub Desktop.
Powershell script to bulk replace spaces with underscores in a directory of files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir | Rename-Item –NewName { $_.name –replace “ “,”_” } |
Get-ChildItem -Directory | Rename-Item –NewName { $_.name –replace “ “,”_” }
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you do that for a directory of folders?