Solved

merging two random files

Posted on 1998-10-07
1
151 Views
Last Modified: 2010-04-30
I would like to merge two random files into a third random file. I am using the get and put statements but I am getting  nowhere. I am using VB4-16bit.
Please show me how to open each of the two files and read each of them into a third file.
Code please..
0
Comment
Question by:dtucker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 total points
ID: 1438741
OPEN file1$ FOR BINARY AS #1
OPEN file2$ FOR BINARY AS #2
ON ERROR RESUME NEXT
KILL file3$
ON ERROR GOTO 0
OPEN file3$ FOR BINARY AS #3
'
spin:
buffer$ = SPACE$( 1024 )  ' assume a 1k read
GET #1,, buffer$
IF EOF( 1 ) GOTO ... ' EOF processing
PUT #3,, buffer$
'
buffer$ = SPACE$( 1024 )  ' assume a 1k read
GET #2,, buffer$
IF EOF( 2 ) GOTO ... ' EOF processing
PUT #3,, buffer$
GOTO spin
' =======

Place EOF processing here

CLOSE

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exit a vb6 apps when a calling it apps closes 15 58
Add and format columns in vb6 7 71
VB6 - Scroll Mouse wheel on Picturebox 13 96
Collapse and expand table in Word 2010 2 103
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question