Page 1 of 1

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

PostPosted: April 11th, 2005, 7:05 am
by ltao
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!

PostPosted: April 11th, 2005, 10:07 am
by Stefan
Hi,

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

Cheers,
Stefan

PostPosted: April 12th, 2005, 1:48 am
by ltao
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?