While the foo.lock is a good idea I would still have to somehow detect that the system's "Print Manager" is done writing the file to know when to remove the foo.lock - which means I'm back to needing the ability to ask ask when the file is finished writing. If I can successfully do that I wouldn't need the foo.lock.
Thanks, Dave
On Mar 23, 2005, at 11:35 PM, JupiterHost.Net wrote:
David Jacopille wrote:I'm looking for some strategies to determine when other applications are finished writing a file. I've got a script printing page layout files to postscript in rapid fashion. I'd like to move the postscript to another location for some additional modifications as fast as possible. I can't figure out how to have my perl script NOT move those postscript files that are in the process of being written.
make foo.lock when you open foo to work on and remove foo.lock when you're done.
don't open it if the foo.lock exists
Search cpan for file and lock file tools
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>