how to detect if a file is complete

Simon Foster simon at uggs.demon.co.uk
Thu Apr 4 18:29:21 EST 2002


On 4 Apr 2002 07:01:43 -0800, harm at laatje.dhs.org (harm) wrote:

>Hi all,
>
>I want to copy some files from one dir to another using python. 
>The files are copied onto my linux box via a samba-share.
>
>I want to write a python script which checks a dir and copies all
>files to another dir. But there is the possibility that the file is
>not yet complete. (This are rather large Postscript files >100mb).
>Therefore I need to detect if the file is complete.
>
>The files are copied on the samba-share by Adobe Acrobat Distiller,
>therefore i cannot save some check file like $FILENAME.complete...
>
>Is there some other way (using python) to detect if the file is
>complete?
>

Why not check the size of the file and consider it complete when
it stops growing?  
--
Simon Foster
Somewhere in the West of England



More information about the Python-list mailing list