
February 26th, 2006, 10:09 AM
|
|
Contributing User
|
|
Join Date: Jan 2005
Posts: 150
Time spent in forums: 1 Day 7 h 42 m 59 sec
Reputation Power: 0
|
|
Adding Text to Text Files [Batch Script]
Given two text files:
C:\INFO.TXT
XXX.XXX
XXXX_XXXX_XXXX_XXXX_XXXX
C:\HISTORY.TXT
TIMESTAMP
XXX.XXX
XXXX_XXXX_XXXX_XXXX_XXXX
TIMESTAMP
XXX.XXX
XXXX_XXXX_XXXX_XXXX_XXXX
I need a batch file / script that is able to do the following:
- Append a “.F53FLIN” to the end of the second line in the INFO.TXT so it looks like “XXXX_XXXX_XXXX_XXXX_XXXX.F53FLIN”
- Add 4 lines in the HISTORY.TXT file, a timestamp (when the script is run, now()), and a copy of INFO.TXT with an empty/blank line following it
So, in essence I am trying to write a script that adds the .F53FLIN to the INFO.TXT (second line) and a TimeStamp+INFO.TXT+BLANK LINE in the HISTORY.TXT (append to the end).
I have tried a few attempts but nothing is coming out even close to right, was hoping someone could help solve the problem.
Any hints, ideas, or help would be greatly appreciated,
|