|
-
July 23rd, 1999, 07:45 AM
#1
How do i use this command in VB5?
Help. i am trying to use this command in VB5 but not as part of a Batch file.
the comand is:
---------------------------------------------------------
Copy /b pic.jpg+*01.zip files\program-01.jpg
---------------------------------------------------------
the command is for a Batch file of a DOS promt. how would i do the same thing in VB with out creating a Batch file and running it. I may even get desperate and make do with shell commands. but i need the sytax.
-
July 23rd, 1999, 07:54 AM
#2
Re: How do i use this command in VB5?
the only support VB offers is the FileCopy command.
Filecopy a, b
But, from your question I see that you try to concatenate files.
You need to read each file and append it to the target manually.
-
July 23rd, 1999, 08:44 AM
#3
Great! but...
Just one question how would i append the zip file to the Jpg file?
i tried to use open "thepic.jpg" for append as #1
print #1, archive.zip
close #1
is that totaly wrong or just partioaly wrong. anyhow what would be the right thing?
-
July 23rd, 1999, 09:42 AM
#4
Re: Great! but...
I am very confused about what you are trying to do.
Are you trying to append a ZIP file to a jpg file? What would the result be?
Well, let's assume that you know what you are doing :-)
to append a zip to a jpg
private Sub Command1_Click()
Dim hfile as Integer
hfile = FreeFile
Open "c:\thepic.jpg" for Append as #hfile
Dim hIn as Integer
hIn = FreeFile
Dim strbuffer as string
Dim strArchive as string
strArchive = "c:\archive.zip"
strbuffer = string(FileLen(strArchive), vbNull)
Open "archive.zip" for binary as #hIn
get hIn, , strbuffer
print #hfile, strbuffer
Close hIn
Close hfile
End Sub
-
July 24th, 1999, 09:22 AM
#5
Yes!
Super!
now with that you can rename you jpg file to zip and extract it using winzip! its just nifty!
Later,
WeedHead
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
|