RE: Check for open file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Write the file with a temporary name and extension. Once the file is
closed,
> change the name to the pattern your server is looking for. Once you finish
> processing it, either change the name again, or move it to a different
> directory. Don't reuse the same file name, but add a numeric value which
> increases every time you create it. Keep a log of which files have been
> processed and any errors each one produced.
> 
> Bob McConnell

I can't require nor expect those copying the files into the share folder to
do this.  No, they will simply be grabbing a set of image files from one
network share and drag them into this Samba share, as is.  I'm not worried
with what happens when PHP picks it up (name changes, moving to a diff
folder, etc., etc.)  I'm only concerned with the first step ... picking up
the file only *after* it's done copying.

I can run PHP as a timed crontask, but I need to figure out a safe way for
it to either grab a file or leave it alone because it's not done yet.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux