How do I concatenate two text files in PowerShell?

前端 未结 11 1948
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 03:17

I am trying to replicate the functionality of the cat command in Unix.

I would like to avoid solutions where I explicitly read both files into variables

11条回答
  •  粉色の甜心
    2020-11-28 03:39

    Do not use >; it messes up the character encoding. Use:

    Get-Content files.* | Set-Content newfile.file
    

提交回复
热议问题