PowerShell(파워쉘) 파일 내 특정문자 내용 변경하기 (Replace)
PowerShell(파워쉘) 파일 내 특정문자 내용 변경하기 (Replace) Replace Specific Characters in a PowerShell File (Replace) PowerShell(파워쉘) 파일 내 특정 문자열의 내용을 변경하는 방법에 대해서 알아보겠습니다. 1. 변경 대상 확인 abc.txt 파일 내 preText 문자를 변경해 보겠습니다. 2. 명령어 입력 명령어: Get-ChildItem -Path "C:\tistorytest" -Include "abc.txt" -Recurse | ForEach-Object{$tmp = Get-Content $_; $tmp=$tmp -Replace ("preText","afterText"); Set-Content -Encoding UTF8 $..
Windows/PowerShell&Command
2023. 6. 28. 19:30