Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pplease for strongm, ftp problem to download file and copy inn c:\tabulati\

Status
Not open for further replies.

sal21

Programmer
Apr 26, 2004
422
IT
Strong, i need a big help with ftp trasfert file, can i send the user and password in private?
 
Without getting your secret username and password, here's my normal response to 'how do I FTP in VB6" question:

Code:
[COLOR=GREEN]' Shell variant
' Requires references to Microsoft Shell Controls and Automation
' This is the upload version (copy a local file to FTP server)[/color]
[COLOR=BLUE]Private Sub Command2_Click()
    Dim ftpFolder As Folder
    Dim myShell As Shell
    
    Set myShell = New Shell
    
    Set ftpFolder = myShell.NameSpace("ftp://user:password@ftp.site.com")
    ftpFolder.CopyHere "c:\test.txt"
End Sub[/color]
 
hi strong, but i need to download from ftp dir /public/mydir\test.csv to c:\tabulati\test.csv
 
Code:
[COLOR=green]' Shell variant
' Requires references to Microsoft Shell Controls and Automation
' This is the download version (copy a file from FTP server)[/color]
[COLOR=blue]Private Sub Command2_Click()
    Dim ftpFolder As Folder
    Dim localfolder As Folder
    Dim myShell As Shell
    
    Set myShell = New Shell
    
    Set localfolder = myShell.Namespace("c:\tabulati")
    Set ftpFolder = myShell.Namespace("ftp://user:password@ftp.site.com/public/mydir")
    localfolder.CopyHere ftpFolder.Items.Item("test.csv")
End Sub[/color]
 
recieve error 91:

set ftpFolder, on cursor is nothing!

localfolder.CopyHere ftpFolder.Items.Item("articoli.csv")

but dubt...

1) the really dir is in arrow signed
2) after i connect the ftp with file ziila, on ths right i see the dir, in question, is located a and not in the pricipal root of ftp! (/
my code:

Private Sub Command2_Click()

Dim ftpFolder As Folder
Dim localfolder As Folder
Dim myShell As Shell

Set myShell = New Shell

Set localfolder = myShell.Namespace("c:\tabulati")
Set ftpFolder = myShell.Namespace("ftp://xxx@aruba.it:xxx@2022@ftp.xxx.it/public/odargi/")
localfolder.CopyHere ftpFolder.Items.Item("articoli.csv")

End Sub

 
Now that's weird. I posted an comment to this the other day, and it has vanished ... guess I forgot to press the Submit Post button. Hmm.

Ok, so, really need you to enclose your code in proper Code blocks, as otherwise the tek-tips text parser does weird things to certain URLs (as you can probably see in your post).

Also, you attached image doesn't seem to support the description you give that "is located a and not in the pricipal root of ftp!"

So, to start with can you type "ftp:// into your browser, follow the prompts (which should include entering username and password), and then screenshot the end result.

Do the same with ftp:// and then post both the screenshots here.
 
Gosh, It's pretty quiet in here these days!

Looks for the tumbleweed blowing through

Take Care

Matt
I have always wished that my computer would be as easy to use as my telephone.
My wish has come true. I no longer know how to use my telephone.
 
Good morning bro.

I'm very busy...

I recently moved house and neighborhood I let you imagine my problems with the move...

Sorry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top