Re: Download ascii file

Giganews Newsgroups
Subject: Re: Download ascii file
Posted by:  Remy Lebeau (TeamB) (gambit47.no.spam@no.spam.yahoo.com)
Date: Wed, 3 Dec 2003

"raissouni omar" <omar.raissouni@awsm> wrote in message
news:FC79056DCF88E240omar.raissouni@awsm...

> how can I download an ascii file from using this component IdFTP.

Simply Connect() to the server and call Get() with the filename, ie:

    IdFTP1.Connect(True);
    try
        IdFTP1.Get('/home/lilio/textfile.txt', 'c:\textfile.txt', True,
False);
    finally
        IdFTP1.Disconnect;
    end;

Or:

    IdFTP1.Connect(True);
    try
        IdFTP1.ChangeDir('/home/lilio);
        IdFTP1.Get('textfile.txt', 'c:\textfile.txt', True, False);
    finally
        IdFTP1.Disconnect;
    end;

Gambit

Replies

None

In response to

Download ascii file posted by raissouni omar on Wed, 3 Dec 2003