How to Upload files to a ftp directory?

Advertisement

mkw007
Guest

How to Upload files to a ftp directory?

Hi to all,

There is a problem that I cannot upload a file to ftp directory. Who can write a demo to upload file to a ftp directory based on Visual Basic 6.0 SDK? And the root directory of my ftp is public_html not /.

My codes based on VB6 to upload a file to my ftp server as follow:

'Connect to the ftp and return the connect handle 'hCon'

FtpCreateDirectory public_html/MyDir 'create a new ftp directory called MyDir

FtpPutFile hCon, LocalFile,MyDir,0 ' to upload a localfile to the ftp directory 'MyDir', but it fail!


Who can help with this?
Thanks!

Reply with quote

Advertisement

mkw007
Guest

Re: How to Upload files to a ftp directory?

Dear Martin,

Thanks for your attention to my poster.
I'm using your WinSCP to upload my files to my ftp server! Your WinSCP can work and upload files to ftp directory sucessfully!
Unfortunately, I use the Windows API demostrated in the previous poster to upload files to the ftp directory,but it fail! I want to know why your WinSCP can work, but the Windows API to upload file to ftp server based an VB6 fail!

Therefore, I'm appreciated if your can help me with this problem?

Thanks!

Description: I'm using your WinSCP!

111.jpg

Reply with quote

Advertisement

You can post new topics in this forum