usage of dropfolder

Thomas McGrath III mcgrath3 at mac.com
Tue Apr 5 08:14:02 EDT 2011


Have you tried using a folder action to let you know when something is added to the folder?

-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net

On Apr 5, 2011, at 7:36 AM, tkuypers at telenet.be wrote:

> Hi gang,
> 
> I'm stuck, after about 4 hours I have to admit I'm not clever enough for this...
> 
> I'm trying to implement a drop-folder based application.
> When a file is found in the folder, I need to open it and check for some data inside the file.
> 
> The actual code to check inside the file takes about 0.01 seconds, so I get a result almost immediately. When there are files in the folder when I start, it works perfectly.
> 
> But when the process is checking every x seconds if there are files in the folder, thing go wrong: LiveCode sees a file in the folder, while the finder is still copying the file to that folder.
> So when I open the file, to read the content, it might still be empty.
> 
> The files are jpg, CR2 (= raw images) and tiff files, ranging anywhere from 10kb to 30 Mb in size, so copying can take a few minutes.
> 
> And now my question: How do I know if the Finder finished copying? Checking the file size doesn't work.
> 
> Any help is more then welcome
> 
> 
> Warm regards,
> 
> Ton Kuypers
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list