Re: Help! Using indy ftp in windows service

Giganews Newsgroups
Subject: Re: Help! Using indy ftp in windows service
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Mon, 30 Apr 2007

"xiaoyvr" <xiaoy…@gmail.com> wrote in message
news:55B2B1CF5A24E340xiaoy…@gmail.com...

>                ftp.ChangeDir(u.LocalPath);
>
>                ftp.Get(filename, LocalPath + filename, true,
false);

You shouldn't be specifying the LocalPath in the filename after you
have already changed to that folder:

    ftp.ChangeDir(u.LocalPath);
    ftp.Get(filename, filename, true, false);

> But in a windows service app, It blocked at
>    ftp.Get(filename, LocalPath + filename, true, false);

Make sure that your service has access to the network to begin with.
Most services don't.

Gambit

Replies

None

In response to

Help! Using indy ftp in windows service posted by xiaoyvr on Mon, 30 Apr 2007