Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenate

Status
Not open for further replies.

kadara

Programmer
Mar 2, 2012
26
DE
Hi,
I'm new in vbscript.
I need your help. I have 2 text files. Here is the first one:

Code:
"^XA~JSB^MMC^MNN^MTT^POL^PMN^LH0,12^PR2,2^MD30^JUS^LRN^CI0^LL320^XZ"
"^XA"
"^FB210,1,,C^FO12,80^A0B,35,30^FDTAKATA-PETRI^FS"
"^FO0,20^GE55,55,3^FS"
"^FB56,1,,C^FO19,16^A0B,27,34z^FD" + ID_NO + "^FS"
"^FB310,1,,C^FO44,0^A0B,34,23^F8^FDMODEL NO: " + MODEL + "^FS"
"^FO75,73^GB40,175,4^FS"
"^FB310,1,,C^FO85,0^A0B,28,36^FD" + DAT + "^FS"
"^FB310,1,,C^FO124,0^A0B,34,34^F8^FDWEBBING: >PET<^FS"
"^FO152,17^GB3,280,3^FS"
"^FO430,17^GB3,279,3^FS"
"^FB310,1,,C^FO454,0^A0B,31,31^F8^FD" + LATK + "^FS"
"^FO513,20^GB80,280,40^FS"
"^FO516,40^FR^BY3,3.0^BCB,48,Y,N,N,N^FDW" + BARCODE + "^FS"
"^PQ1,1,1,Y"
"^XZ"

I have an other text file which contains the values of the variables: ID_NO, MODEL, DAT, LATK, BARCODE. Here is the file:

Code:
DLG=EZE_HLB|DAT=00.00.0000|ZEI=00:00|ATK=306628799JAB-AA|LATK=306628510-AB|LAYOUT=7|ID_NO=G|MODEL=J202|ECE_TYPE=Ar4m|ECE=045508|EEC_TYPE=Ar4m|EEC=045508|AIRBAG=True|PRET=ZZZZ|BARCODE=X00|SCANBAR=00000000|

How do I concatenate the two files (I want to include the values from the second file into the first).
Please help.
Thanks.
 
What have you tried so far and where in your code are you stuck ?
Tip: have a look at FileSystemObject, Split(), Replace()

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top