Skip to content

Instantly share code, notes, and snippets.

@Dillie-O
Last active December 20, 2015 09:18
Show Gist options
  • Save Dillie-O/6106435 to your computer and use it in GitHub Desktop.
Save Dillie-O/6106435 to your computer and use it in GitHub Desktop.
Find all file names with spaces in a directory, call SVN rename to replace with _ Note: Text provided is multiline, you can delete the new line characters to run at the command prompt.
Get-ChildItem | Where-Object {-Not $_.PsIscontainer -AND $_.name -match "\s"} |
foreach {
$fixedname = $_.name.Replace(' ','_');
iex "svn rename '$_' $fixedname"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment