-
December 4th, 2001, 01:06 AM
#1
Merging 2 Text files
Hi,
I want to merge 2 text files into a single one through VB. Please help me out.
Thanks in Advance
Regards,
Bala
-
December 4th, 2001, 01:13 AM
#2
Re: Merging 2 Text files
1. Read both into seperate buffers and concatenate them and print again. You can have a different name for the new file, if you wish
or
2. Read the secong file into a buffer. Open the first file in append mode and write the buffer. The first file will be updated with the contents
or do the same for the 2nd file!
You want the logic or code?!
RK
-
December 4th, 2001, 08:31 AM
#3
Re: Merging 2 Text files
Private Sub Command1_Click()
Dim filename1 As String
Dim filename2 As String
Dim filename3 As String
filename1 = "c:\config.sys"
filename2 = "c:\autoexec.bat"
filename3 = "c:\allfiles.txt"
Shell "c:\command.com /c copy " & filename1 & " + " & filename2 & " " & filename3, vbHide
End Sub
Iouri Boutchkine
iouri@hotsheet.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|