'Consolidates the contents of the files instead of editing one by one

$file = 'G\*\configs.txt'
$find = '192.168.152.161:8011'
$replace = '{appconfigs.writes}'

(Get-Content $file).replace($find, $replace) | Set-Content $file

When I run the edit script on all the files together The script unites them and does not edit one by one.

what can we do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source