[futurebasic] Re: [FB] Re : [FB] Watched folder

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 1999 : Group Archive : Group : All Groups

From: Paul Bruneau <paul_bruneau@...>
Date: Thu, 08 Apr 1999 10:07:15 -0400
jonathan wrote:
> 
> > I some time ago wrote a program which watches a folder, then if it finds
> > a file in that folder it sends it down the serial port to a Zebra printer.
> 
> Why anyone would want to rpint Zebras beats me ;-)

ha ha. I hear you French guys think Jerry Lewis is hilarious too. :)
 
> > All works well except for larger files. Sometimes the program will start
> > to do its stuff to a file that isn't completely there yet (due to its
> > larger size), and the transfer fails. Can someone tell me a good way to
> > make my program hold off until the file is completely copied over there?
> > I'm currently not getting (or maybe not checking) for any error messages
> > from the system.
> 
> why not create your original file as invisible. And change the attribute
> to visible once it has been completely transfered. Then change your
> 'detect something in folder code' to ignore invisible files (which it should
> do anyway). Thus 'visibility' serves as a flag deciding whether a file
> can be 'Zebrad'.

That would work, I guess, but then, I might as well name it something
with a string that I tell my program to ignore, then change the name
after it is complete. Or I could set the label. But all those things
seem to me to be not optimal. I am looking more for a "busy" flag like
Mark spoke of. That seems like the right way to me.

Also, here's an overriding reason why that suggestion won't work in this
case. The file that is getting acted on is a text export from FileMaker
Pro. I don't have the source to FM, so I can't make it set the
visibility :)

PB