ここにテキストファイルがありますtxtfile.txt
line1
line2
add after this line
line4
etc
etc
add after this line
ユーザーが入力した情報の後に行を追加できるバッチファイルを作成したい。無傷のままadd after this line
。
例:
enter info: asdf
ファイルは次のようになります
line1
line2
add after this line
asdf
line4
etc
etc
基本的なプロセスは、ファイルをコピーしてループし、行を見つけたら、その行を追加してから残りをループすることだと思います。私はそれを行う方法を知りたいです。