Cronjob moves files from ftp upload directory before upload is complete

Cronjob moves files from ftp upload directory before upload is complete

Post by Mike » Sat, 27 Apr 2002 06:13:07


Hello,

Any help or suggestions would be greatly appreciated.
I am running a cronjob that moves files from several users ftp upload
directories into another directory and processes these files. The problem I
am encountering is that files that are in the process of uploading are moved
before the upload is complete resulting in a partial file moved.
What is the best way to handle this?

Mike

 
 
 

Cronjob moves files from ftp upload directory before upload is complete

Post by Barry Margoli » Sat, 27 Apr 2002 07:49:44




>Any help or suggestions would be greatly appreciated.
>I am running a cronjob that moves files from several users ftp upload
>directories into another directory and processes these files. The problem I
>am encountering is that files that are in the process of uploading are moved
>before the upload is complete resulting in a partial file moved.
>What is the best way to handle this?

Have them upload the files to a temporary name, and use a common suffix for
all the temporary names, and then rename them to the real name when the
upload is done.  The cronjob shouldn't move files that still have the
temporary name suffix.

--

Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. how to move only completed FTP uploads

Hi,

Please help.
I need a script that I can run with cron.
I have a script like this in place now...

mv /somewhere/uploadarea/* /somewhere/processingarea

I have an FTP upload only area.
When the files have arrived I periodically move them to another place
for processing.

Sometimes I get zero-length files - this is not acceptable.
I presume this is because the file has been moved bofore the upload
has been completed.

How do I skip moving files that are not yet complete?

Thanks!

2. CSH env command

3. How to upload files via FTP/HTTP using cronjob?

4. Mounting Zip Drive

5. Info about a file during upload (upload with post through a form)

6. Add Linux to OS/2 boot manager

7. file permissions & group membership when uploading files via FTP

8. What file(s) control services at startup?

9. Is Old File Destroyed During an FTP upload of the same file?

10. vsftpd - chown on upload (Q: migrating "upload" directive from wu_ftpd ftpaccess)

11. Which ftp can upload a whole directory tree ?

12. how to upload a whole directory via FTP?

13. How upload of directory structure via FTP?