Hi all,
I'am trying to download files using VB from a host http machine. Currently i'am using inet.openurl(" to get one file at a time.
I wanted to know a way of getting all the files in the dir and also getting all subdirectores.
I have a folder called xyz which is on a host machine.
xyz contains 1 or 2 files and 2 or 3 subdirectories. Nothing is static. It could contain as many files and folder in the dir. The subfolders also have files and other folder and so on.
what i need to do is get all the files and sub folders/subfolders/files in xyz into my local machine in a similar way as its stroed in the host machine.
the code right now i'am using for getting 1 file from host and copying on my machine c:\
Set Inet = CreateObject("InetCtls.Inet.1")
Inet.Protocol = icHTTP
Dim bytRet() As Byte
Dim strDate As String
Dim intCnt As Integer
bytRet = Inet.OpenUrl(" ' icByteArray)
Do While Inet.StillExecuting ' Waiting
DoEvents
Loop
Open "c:\xyz.txt" For Binary Access Write As #fn
Put #fn, , bytret()
DoEvents
Close the open file
Close #fn
I need a solution to recursively copy all the files and folders from the host to my client machine
Any pointers in the right direction would be really really helpful..
Thanks in advance
I'am trying to download files using VB from a host http machine. Currently i'am using inet.openurl(" to get one file at a time.
I wanted to know a way of getting all the files in the dir and also getting all subdirectores.
I have a folder called xyz which is on a host machine.
xyz contains 1 or 2 files and 2 or 3 subdirectories. Nothing is static. It could contain as many files and folder in the dir. The subfolders also have files and other folder and so on.
what i need to do is get all the files and sub folders/subfolders/files in xyz into my local machine in a similar way as its stroed in the host machine.
the code right now i'am using for getting 1 file from host and copying on my machine c:\
Set Inet = CreateObject("InetCtls.Inet.1")
Inet.Protocol = icHTTP
Dim bytRet() As Byte
Dim strDate As String
Dim intCnt As Integer
bytRet = Inet.OpenUrl(" ' icByteArray)
Do While Inet.StillExecuting ' Waiting
DoEvents
Loop
Open "c:\xyz.txt" For Binary Access Write As #fn
Put #fn, , bytret()
DoEvents
Close the open file
Close #fn
I need a solution to recursively copy all the files and folders from the host to my client machine
Any pointers in the right direction would be really really helpful..
Thanks in advance