Windows batch - concatenate multiple text files into one

前端 未结 9 579
醉梦人生
醉梦人生 2021-01-31 13:53

I need to create a script, which concatenates multiple text files into one. I know it\'s simple to use

type *.txt > merged.txt

But the require

9条回答
  •  离开以前
    2021-01-31 14:39

    cat "input files" > "output files"

    This works in PowerShell, which is the Windows preferred shell in current Windows versions, therefore it works. It is also the only version of the answers above to work with large files, where 'type' or 'copy' fails.

提交回复
热议问题