您可以使用 Windows PowerShell 脚本来实现批量操作某一个目录下的所有子文件夹和文件的字符替换。
以下是一个示例:
$folder = 'C:\example'
$oldString = 'old'
$newString = 'new'
Get-ChildItem -Path $folder -Recurse | ForEach-Object {
if ($_.PSIsContainer) { return }
$file = $_.FullName
(Get-Content $file) | ForEach-Object {
$_ -repl