Link to home
Start Free TrialLog in
Avatar of nandu_cpt
nandu_cpt

asked on

down load fiile from ftp server

Dear all

iwants to copy files from ftp server thr. vb code.
how to do.

Note. I know the file name ( it is availabe on ftp server).
now i have using ftp software.
i hv loging to ftp software. next i have downloading the file from ftp.
if i know the vb code directly click the vb app. it will download the file from ftp server so am asking this question.

Pls help me

thanks/regs
Nanda
Avatar of R_Rajesh
R_Rajesh

You may use Inet control.
Avatar of nandu_cpt

ASKER

Hi,
I am getting a error message, "Unable to connect to remote host"

I am using below coding

Form1.Inet1.RemoteHost = "ftp://test.co.in"
  Form1.Inet1.URL = "ftp://test.co.in/"
  Form1.Inet1.UserName = "test"
  Form1.Inet1.Password = "test"
  Form1.Inet1.Protocol = icFTP
  Form1.Inet1.Execute "ftp://test.co.in/", _
    "GET dailybackup.zip C:\dailybackup.zip"

pls advice
What exactly is the error that you are getting?
Ooops! I missed that error u have given.

Try pinging the host. Are you able to ping the host? If you are unable to ping, check your network setting or cantact your network admin. May be you are behind a firewall, in which case you have to specifymore properties in order to get connected.
No, my net work setting working fine,
i hv one doubt,

this file availabe in www folder
how to config in our prg.

1 . Form1.Inet1.Execute "ftp://test.co.in/", _
    "GET dailybackup.zip C:\dailybackup.zip"
 
or

2. Form1.Inet1.Execute "ftp://test.co.in/www", _
    "GET dailybackup.zip C:\dailybackup.zip"

which one is correct. i am getting a error message only above lines


Your second setting shoudl be fine.

Try using a standard FTP software to connect to your site manually. once you have done that you would know what will be the path exactly.
ASKER CERTIFIED SOLUTION
Avatar of RanjeetRain
RanjeetRain

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
if i connect i am in

1. "\"

next i can see below sub folder's list

2.db
log
www

next i will go to www folder

then i am downloading the backup file

so my backup file is \  ->  www--> available here only

Yes. That's what my guess was too. Because normally it is www floder where webroot for a hosted site begins. So, your second code shoudl work. Have you tried that?
same error "Unable to connect to remote host