Actually, you can do this is a batch file with only two commands if you'd prefer...
filename = combine.bat, contents as follows:
copy file1.txt + file2.txt + file3.txt tempfile.txt
sort /r+1 tempfile.txt /oNewFile.txt
This sill combine the 3 input files into a new one named "tempfile.txt" then sort it starting with column 1 creating a final output file named "NewFIle.txt"
You can add a third line to the batch file "del tempfile.txt" for cleanup if desired.
Main Topics
Browse All Topics





by: TheMCSEPosted on 2005-05-03 at 15:08:12ID: 13922117
Are all of the IDs globally unique (or the entire line)? Do you want to copy the data from the 2nd, 3rd, and 4th files, or move it (if this process were to run again, there would be duplicates). Based on the information you provided, I don't think that the other fields would be relevant to crafting this solution. Are you opposed to using COM? Realistically this could be created in VBS relatively easily, but the code should still work in VB.