[Tutor] file move with wait period

banda gunda bandagunda at hotmail.com
Thu Aug 3 07:22:20 EDT 2017


Dear tutors,

I am interested to move a set of files, periodically, from source_folder to dest_folder.
source_folder receives processed files from a ‘decompressing program’.  The files are deposited from the ‘decompressing program’ at periodic random intervals.  Furthermore some of the files dropped in the source_folder are large, of typical size 800MB.  These files take time before it is completely deposited in the source_folder.

I could use shutil.move (source_folder, dest_folder).  But then how?

The frequency of moving files from source_folder to dest_folder is flexible.  It could be once in 15 minutes (or even lengthier).
Challenge for me:  How could the code include the wait statement to make sure that the file in the source_folder is completely formed before attempting to move to dest_folder?
Thanks in advance for your comments/guidance.

Best,
Kumar.
+



More information about the Tutor mailing list