A question of Indy9'TidFTP,see it and help me.

Please discuss general Delphi programming topics here.

A question of Indy9'TidFTP,see it and help me.

Postby ltao » April 11th, 2005, 7:05 am

A small Program of mine used indy9(TidFTP),the question is:

I want to rename the file that download by idFTP's Get porcedure,the rename code was written in the "OnAfterGet" event of idFTP,but the file seems still open and refuse the rename operate.
How can I close the file before then rename operate(I can't get the Handle of the file) or how can I rename the file successfully?

TKS A LOT!
ltao
Member
Member
 
Posts: 2
Joined: April 11th, 2005, 7:01 am

Postby Stefan » April 11th, 2005, 10:07 am

Hi,

Have you tried renaming it in the OnWorkEnd event?
Or the OnStatus (when status = ftpReady, [RSFTPStatusDoneTransfer])?

Cheers,
Stefan
User avatar
Stefan
Moderator
Moderator
 
Posts: 128
Joined: September 27th, 2004, 9:40 am
Location: Tilburg, The Netherlands

Postby ltao » April 12th, 2005, 1:48 am

Thank u Stefan, but it doesn't work!
I tried writting the code in "OnWorkEnd" and "OnStatus",however, the question exist .

BTW:I put the downloading porcedure into a Thread,can this affect renaming action?
ltao
Member
Member
 
Posts: 2
Joined: April 11th, 2005, 7:01 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 7 guests

cron