From: Tim Pease Date: 2008-04-20T08:10:19+09:00 Subject: Re: changenotify - determine when a file has been closed. On Apr 18, 2008, at 7:25 PM, Sean Nakasone wrote: > Is there a way to determine when a file has been closed? I know the > changenotify module can determine when a file is written to, but I > need to know when it has been closed. The file is a postscript file > being created by a printer driver and I want to make a copy of it > when the file is done being written to. > A quick way to do this would be the directory_watcher gem. It watches files in a directory and notifies you when those files change -- add, modified, deleted. There is a fourth file notification event called "stable" -- this is sent when the file has remained un-modified for X amount of time. It's all ruby code, so it should work on Windows and Unix equally well. Blessings, TwP