Re: Check FTP file
Re: Check FTP file
- Subject: Re: Check FTP file
- From: "Adam Bell" <email@hidden>
- Date: Wed, 19 Apr 2006 00:27:19 -0300
The "standard" way is to check the size of the file in a loop with a delay or idle script and fire the next instruction when the file size remains constant for a cycle or two.
Something like this (as a Folder Action that appeared in this list):
on adding folder items to thisFolder after receiving theItems
repeat with f in theItems
-- wait for the item to be all there
set was to 0
set isNow to 1
repeat while isNow ≠ was
set was to size of (info for f)
delay 2 -- longer if getting the item is slow
set isNow to size of (info for f)
end repeat
-- Now do stuff to another f in thisFolder
end repeat -- get next item f in thisFolder
end adding folder items to
On 4/18/06, Honglei Zhang <
email@hidden> wrote:Hi
Is there any way to check if the FTP transfer file is completed or
not? Because I want to move those file to another folder when it is
ready.
Cheers
----------------------------------------------------------------
Honglei Zhang
IT Developer
Level 9, 60 Airedale Street, Auckland City
PO Box 7078, Wellesley Street, Auckland 1036, New Zealand
DDI: +64-9-300 6892
NZ Mobile: 021- 049 5241
Email: email@hidden
Web:
http://www.e-net.co.nz
http://www.e-cast.co.nz
----------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
--
Some minds remain open long enough for a truth to both enter and leave without processing.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden