Home > OS >  How to TXT text append records
How to TXT text append records

Time:09-17

1. TXT file 2 g
2. TXT dozens K

At ordinary times every day to 1. TXT to add new data, every time is PilotEdit open to add, if one day I am a little bit of a problem several times, now want to use the bat to add,

@ ECHO OFF
@ ECHO.
The set/p a=& lt;" F: \ TXT \ 1. TXT "
Type "F: \ TXT \ 1. TXT" & gt;> "F: \ TXT \ 2. TXT" \ n
@ ECHO has been successfully added text
Pause


To 1. But the 2. TXT TXTX add not append only after the last line, such as:
1. Data in TXT is
123
456

2. The data in TXT is
789
Run after the bat
123
456789
I want to add after 1. TXT content is
123
456
789
With each additional is only additional line, don't know how to change

CodePudding user response:

"enter. TXT text content" will have to do is press a enter
 @ ECHO OFF 
@ ECHO.
Type "enter. TXT" & gt; & gt;" 1. TXT "
Type "2. TXT" & gt; & gt;" 1. TXT "
@ ECHO has been successfully added text
Pause

CodePudding user response:

 @ echo off 
Echo=& gt;> Revised
Type 2. TXT & gt;> 1. TXT

CodePudding user response:

Use the bat, there'll be a carriage return at the end, the next with don't have this problem

CodePudding user response:

reference 1/f, my great god reply: 666
"enter. TXT text content" will have to do is press a enter
 @ ECHO OFF 
@ ECHO.
Type "enter. TXT" & gt; & gt;" 1. TXT "
Type "2. TXT" & gt; & gt;" 1. TXT "
@ ECHO has been successfully added text
Pause
this way, really,,,,,,,,,
  • Related