Last active
November 23, 2018 15:57
-
-
Save jtheisen/3d40629a4d180b870da2a282e364dacd to your computer and use it in GitHub Desktop.
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
Get-ChildItem -Recurse -Include bin,obj |? { $_.FullName -inotmatch 'node_modules' } | foreach { Remove-Item -Recurse $_ } |
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
Param( | |
[Parameter(Mandatory=$True,Position=1)] [string]$Path, | |
[Parameter(Mandatory=$True,Position=2)] [string]$OldName, | |
[Parameter(Mandatory=$True,Position=3)] [string]$NewName | |
) | |
Get-ChildItem $Path -Filter "*$OldName*" -Exclude ".*" -Recurse | Rename-Item -NewName { $_.name -replace $OldName, $NewName } | |
Get-ChildItem $Path -Include *.cs, *.csproj, *.nuspec, *.sln -Exclude ".*" -Recurse | ForEach { (Get-Content $_ | ForEach {$_ -replace $OldName, $NewName}) | Set-Content $_ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment