I want to use the XMLHTTP object to list a directory at a remote FTP site.
I can download a file with this code:
Set oXML = CreateObject("Microsoft.XMLHTTP"
With oXML
.Open "GET", mURL & mDownload_FileName, False, mUserName, mPassword
.send
If .readyState = 4 Then b() = .responseBody
Open mOutput_FileName For Binary Access Write As #1
Put #1, , b()
Close #1
End With
This works fine if I already know the file's name. But I want to list *all*
the files in the target directory. I assume I need something like .Open
"DIR", ...but am not sure of the syntax.
I can download a file with this code:
Set oXML = CreateObject("Microsoft.XMLHTTP"
With oXML
.Open "GET", mURL & mDownload_FileName, False, mUserName, mPassword
.send
If .readyState = 4 Then b() = .responseBody
Open mOutput_FileName For Binary Access Write As #1
Put #1, , b()
Close #1
End With
This works fine if I already know the file's name. But I want to list *all*
the files in the target directory. I assume I need something like .Open
"DIR", ...but am not sure of the syntax.