app.cofig ファイル内のテキストを置き換える単純な置換スクリプトを試しています。しかし、それは処理されただけで何もしません:
$old = 'Z:\gene'
$new = 'z:\gene\scripts'
Get-ChildItem z:\gene\scripts\Test\App.config -Recurse | Where {$_ -IS [IO.FileInfo]} |
% {
(Get-Content $_.FullName) -replace $old,$new | Set-Content $_.FullName
Write-Host "Processed: " + $_.FullName
}
私が間違っていることを考えてください。同じスクリプトが.txtファイルに対して正常に機能するため、ありがとう