본문 바로가기

파워쉘

[파워쉘] 파일 합치기, 파일 끝에 내용 추가하기


일괄적으로 여러 파일의 끝에 같은 내용을 추가하고자 할 때,

add-content -path *.txt -value "***END***" -Encoding unicode


여러 파일을 하나의 파일로 합치되, 이름순 정렬하여 합치고자 할 때,

get-childItem *.txt -Name | %{Get-Content -Path $_} | Add-Content .\total.txt