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.
可能かどうかはわかりませんが、たとえば、最初の行または空でない場合にECHO FOR /F blah blah blah >>output.txt特定の行の前に移動する方法です。output.txt
ECHO FOR /F blah blah blah >>output.txt
output.txt
これはかなり単純化されていますが、質問の一部に答えます。
ファイルの一番上に行を追加します。
echo First line >newfile.txt type oldfile.txt >>newfile.txt move newfile.txt oldfile.txt >nul