Barbulescu
asked on
read 2 text files and write to the 3rd one
I have 2 text files:
TextFile1.txt contains only one entry
TextFile2.txt contains multiple entries, unknown number
I would like a script (I am open to the most feasible suggestions) that will write in TextFile3.txt as follows:
TextFile_1_Entry1 TextFile2_Entry_1
TextFile_1_Entry1 TextFile2_Entry_2
TextFile_1_Entry1 TextFile2_Entry_3
TextFile_1_Entry1 TextFile2_Entry_4
.
.
.
.
TextFile_1_Entry1 TextFile2_Entry_n
Basically, in excell this can be done with the following function:
=PROPER(A21&" "&B21)
I am looking for a batch script or other form of script that I could execute in the folder which contains TextFile1 and TextFile2 , a scrip that will write the output in TextFile3 by default.
Thank you!
TextFile1.txt contains only one entry
TextFile2.txt contains multiple entries, unknown number
I would like a script (I am open to the most feasible suggestions) that will write in TextFile3.txt as follows:
TextFile_1_Entry1 TextFile2_Entry_1
TextFile_1_Entry1 TextFile2_Entry_2
TextFile_1_Entry1 TextFile2_Entry_3
TextFile_1_Entry1 TextFile2_Entry_4
.
.
.
.
TextFile_1_Entry1 TextFile2_Entry_n
Basically, in excell this can be done with the following function:
=PROPER(A21&" "&B21)
I am looking for a batch script or other form of script that I could execute in the folder which contains TextFile1 and TextFile2 , a scrip that will write the output in TextFile3 by default.
Thank you!
Can you upload two sample text files? The files should closely represent the actual data.
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you need a VBS or powershell script let me know.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Wow, so simple, I had kind of written batch files off a while ago.
Perhaps they are worth a second look.
Perhaps they are worth a second look.
Yes, they can be quite powerful once you get some of the basic building blocks down.
~bp
~bp
ASKER
Thank you for your support.
Welcome, glad that was useful, thanks for the feedback.
~bp
~bp