|
-
Jun 16th, 2001, 11:14 PM
#1
Thread Starter
Lively Member
How to Download Multiple File(s) from a Protected FTP Site...
Hi Guys,
I'm designing a APP that will contact a Protected FTP Site to check for file downloads. The System will be online 24 Hrs. My duty is to check for download of files in a Specified Directory (Say ftp://somesite.com/Downloads) I'm using the Inet Control to get and Send Files. I should download the files if any to a directory on Local Harddisk. How to download a file from the site. I know that I should use the GET Method to get a file. I get a Problem if I try to download more than One file. SO please specify me a method on how should I get the File(s) from the Site using the Inet Control. First of all is it Possible to get it with a Inet Control or anyother Method should be used. Any Help is welcome. Thanks in Advance
-
Jun 17th, 2001, 10:06 AM
#2
We do this -- assuming you every file, you can use wildcards.
ftp scripts allow you a lot of flexibiliity without having to write supporting code for every filename/pathname change
ftp script
Code:
open ftp.whatever.com
username
password
lcd c:\localpath
cd remotepath
asc
mget *.*
bye
vb code
Code:
Public Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Sub ftpGet()
Dim WindowsDir as String, lSiz as Long, retval as Long
Dim cmd$
WindowsDir = Space(255)
retval = GetWindowsDirectory(WindowsDir,lSize)
WindowsDir = left(WindowsDir,lSize)
cmd$ = WindowsDir & "ftp -is:script.ftp"
Shell cmd$,vbNormalFocus
End Sub
-
Jun 17th, 2001, 11:05 AM
#3
Thread Starter
Lively Member
Can u Explain the Terms lcd, asc, mget, etc.,
Hi Jim,
Thanks for ur code. By the By I'm new to FTP. Can U explain me the terms a little bit detail. Actually what should we do. What's our command to get multiple files. Say Suppose My FTP Site contains *.wav file(s). Now What should I give to get the Wave Files to my Local Directory Say (c:\Downloads\). Here what's the use of GetWindowsDirectory API. Is it playing any Important Role here. Can u also Explain its use also. Please.... don't get upset of my Questions. Kindly Help. Thanks in advance.
-
Jun 17th, 2001, 02:10 PM
#4
Registered User
I think I've found exactly what you need...
-
Jun 17th, 2001, 10:17 PM
#5
Thread Starter
Lively Member
Thanks Olly I got it and meet u later...
Hi Olly,
I got the code. I'll see to it and meet u later. Anyway thanks to all u guys...
-
Jun 19th, 2001, 12:46 PM
#6
Registered User
-
Jun 19th, 2001, 09:10 PM
#7
Thread Starter
Lively Member
Thanks a Lot Olly...
Hi Olly,
Got all the Code. I'll mail you after trying them. Thanks a Lot man....
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
|