使用场景:管理者模式打开PowerShell(win+x->PowerShell管理员),然后跳转到所在文件下,输入以下命令,
作用是将该文件夹下所有文件夹和文件的名称中包含的oldstring替换为newstring。
可以用于更改wpf程序文件的项目名称。
Get-ChildItem -File -Recurse | Rename-Item -NewName { $_.Name -replace 'oldstring','newstring' }
使用场景:管理者模式打开PowerShell(win+x->PowerShell管理员),然后跳转到所在文件下,输入以下命令,
作用是将该文件夹下所有文件夹和文件的名称中包含的oldstring替换为newstring。
可以用于更改wpf程序文件的项目名称。
Get-ChildItem -File -Recurse | Rename-Item -NewName { $_.Name -replace 'oldstring','newstring' }