[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

binary copy

Posted on 2006-06-08
2
Medium Priority
?
190 Views
Last Modified: 2010-08-05
Hi,

in dos you can copy two file to one with this command:  "copy  /B Filea + Fileb Filec"
In my case:
    Filea = text-file
    Fileb = pdf-file
    Filec = output file

Is this posible in VB?

For now i have a shell call to this instruction, but i want to do it all in vb.

Wim
0
Comment
Question by:Wim
  • 2
2 Comments
 
LVL 26

Expert Comment

by:EDDYKT
ID: 16860428
if shell works for you, y not use shell?
0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 1000 total points
ID: 16860444
Private Sub Command1_Click()
Dim Filea As String, Fileb As String, Filec As String
Dim ff As Integer, s As String, s1 As String
   
Filea = "Text - file"
Fileb = "pdf - file"
Filec = "output file"
   
ff = FreeFile
Open Filea For Binary Access Read Lock Read Write As #ff
s = Space$(LOF(ff))
Get #ff, , s
Close ff
   
ff = FreeFile
Open Fileb For Binary Access Read Lock Read Write As #ff
s1 = Space$(LOF(ff))
Get #ff, , s1
Close ff

ff = FreeFile
Open Filec For Binary Access Write Lock Read Write As #ff
Put #ff, , s & s1
Close ff

End Sub
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

830 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