Solved

merging two random files

Posted on 1998-10-07
1
145 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
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

706 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now