tags:

views:

34

answers:

3

Hi,

I would like to know how to transfer a file from local machine to server using ftp in VB 6.0. Please provide any guidelines or links you think will be useful as I haven't tried this before.

A: 

I guess it also depends on your FTP needs.

If its a file at a time, you could just call the Windows ftp command line from VB6,

if you need to do more than that you can use this or this.

Koekiebox
I created a batch file as below:-1 open 192.168.1.3 222 root3 !@#%RedHat%)(*4 cd "/opt/test"5 put "C:\envars.exe" "envars.exe"6 byeusername is 'root' and password is !@#%RedHat%)(*I tried running the batch file from the command prompt as follows:-C:\>ftp -s:F:\testScript.txtNow I am getting the following error:-ftp: connect : unknown error numberPreviously I was getting message connected followed by connection closed by remote host.However, I am able to connect to this server using Filezilla.Please let me know if you are able to figure out what is the iss
sujimon
It worked finally after I usesd pscp that comes with PuTTY. I found it in one of the thread here will post that link later. Thanks everyone for ur replies.
sujimon
A: 

Dear Koekiebox,

Thanks for those links. I have found out a few links as well and I think I will be able to do this using the Inet control.

I understand that you want me to invoke the 'Run' window and ftp to the server, Is that correct?. However, from the information I got from my team it was not possible to access the server which requires a username and password.

Another person suggested that I use a batch file with FTP details and then call the Shell function. Can you give some pointers on how to make a batch file with FTP details?

sujimon
If you want a clarification of an answer, please add it as a comment to that question. That way, the person will be notified. You've now added another "answer", and Koekiebox won't see that. Also, why don't you ask that other person about the batch file? He suggested it, he'll probably know more about it than some random person on the internet.
MSalters
+1  A: 

I'm using cFtp.cls for my FTP uploads/downloads -- a heavily modified version of a source snippet somewhere from the The Bathroom Wall of Code.

wqw