waytech2003
Programmer
I know this has been discussed before, but I can not seem to get this to work. I want to download a text file from a sub-directory on a website. I have sample code below.
Code:
Private Sub Command1_Click()
Dim Reply As Variant
Dim ftpFolder As Folder: Dim ftpShell As Shell: Set ftpShell = New Shell
Dim localFolder As Folder: Dim localShell As Shell: Set localShell = New Shell
Set localFolder = localShell.NameSpace("C:\")
Reply = localFolder.Items.Count'This gives me a good count number
Set ftpFolder = ftpShell.NameSpace("ftp://myUsername:myPassword@myWebsite.com/SubDir1/SubDir2/")
Reply = ftpFolder.Items.Count 'This returns ZERO
localFolder.CopyHere ftpFolder.Items.Item("textfile.txt")
End Sub