Skip to content

Instantly share code, notes, and snippets.

@napsternxg
Last active December 14, 2015 08:09
Show Gist options
  • Save napsternxg/5056161 to your computer and use it in GitHub Desktop.
Save napsternxg/5056161 to your computer and use it in GitHub Desktop.
Rename camel case files in a folder to split file name.
ls -name | where {$_ -cmatch "^([A-Z][a-z]*){2,}$"}
ls -name | where {$_ -cmatch "^[A-Z][a-z0-9]+[A-Z][A-Za-z0-9]+$" } | ren -new { ($_ -creplace "([A-Z0-9])", " $&").Trim() }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment