Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Windows で 1 つの txt ファイルの内容を取得して別のテキスト ファイルの末尾に追加する単純なバッチ スクリプトを作成する方法
type コマンドを使用して、ファイルを連結できます。試す
type file1.txt >> file2.txt
ブレットの答えはうまくいきます。別の選択肢は
copy file1.txt + file2.txt /b
追加のファイルを追加することにより、この構文で任意の数のファイルを追加できます。
このオプションは、コピー後にファイルの終わりマーカーがファイルの終わりに追加されるのを/b防ぎます。<ctrl-Z>
/b
<ctrl-Z>