Greetings to Forum members!

Please let me know if any one can help with below problem.

Problem Statement: How to concatenate two strings from two different .dat based text files using VBA

For example, I will have multiple .dat based files in a specific folder with splitted record at end of the file.

Semicolon is the indicator for end of the file.
If the dat file do not contain semicolon at end of the dat file then this split of remaining record will be available dat file in the sequence.

Is it possible to have a proc/func to look for above kind of broken record and merge into destination dat file.

Example:

Before Merge:


RELAT_Data355_20150419100702_chunk001
1,41,9993,999990961403273,9663277999,20150619064947,88866228054,,04161,04161,49872,0118613817927787,,,,, 00001, 0000007, .0007,.0007,1,,,,Y,0,,RELATSMARTR1,20150419000000,310260,RELAT IND,M;
2,41,9993,999990961403273,9663277999,20150619064947,88866228054,,04161,04161,49872,0118613817927787,,,,, 00001, 0000007,

RELAT_Data355_20150419100702_chunk002

.0007,.0007,1,,,,Y,0,,RELATSMARTR1,20150419000000,310260,RELAT IND,M;3,41,9993,999990961403273,9663277999,20150619064947,88866228054,,04161,04161,49872,0118613817927787,,,,, 00001, 0000007, .0007,.0007,1,,,,Y,0,,RELATSMARTR1,20150419000000,310260,RELAT IND,M;


Expected result After Merge:

RELAT_Data355_20150419100702_chunk001:
1,41,9993,999990961403273,9663277999,20150619064947,88866228054,,04161,04161,49872,0118613817927787,,,,, 00001, 0000007, .0007,.0007,1,,,,Y,0,,RELAT SMARTR1,20150419000000,310260,RELAT IND,M;

RELAT_Data355_20150419100702_chunk002:

2,41,9993,999990961403273,9663277999,20150619064947,88866228054,,04161,04161,49872,0118613817927787,,,,, 00001, 0000007, .0007,.0007,1,,,,Y,0,,RELAT SMARTR1,20150419000000,310260,RELAT IND,M;3,41,9993,999990961403273,9663277999,20150619064947,88866228054,,04161,04161,49872,0118613817927787,,,,, 00001, 0000007, .0007,.0007,1,,,,Y,0,,RELAT SMARTR1,20150419000000,310260,RELAT IND,M;

Upon merging the record in above case the partial part of the record in chunk001.dat need to be removed and saved and to make sure the end of the record is with semicolon.
Similarly the updated record in chunk002.dat need to be saved with merged record at top i.e starting of the record.

A note is I will have chunk files always starts with chunk001, chunk002, chunk003, chunk004 and so on.

Thanks & Regards!