LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   file locking in ftp (https://www.linuxquestions.org/questions/linux-newbie-8/file-locking-in-ftp-374939/)

krunal 10-20-2005 02:14 AM

file locking in ftp
 
hi friends,

please help me out in this problem.

My client will upload files through ftp .The ftp server is running on linux. I have a script written in VB running on windows which will run every 10 min. and download files through ftp which were uploaded by the client. The problem is that if the client has uploaded only half the file (say 5 MB out of 10 MB) and the script starts downloading at this movement, then only half the file will be downloaded. What i am looking for is a way through which i can lock the file while it is being uploaded so that the script is not able to download it until it is fully uploaded.

titopoquito 10-20-2005 03:38 AM

Maybe you can create a separate lock file while the file is transferred to your ftp server and delete it afterwards when the transfer is completed. In your VB script you could check if that lock file exists and then exit, otherwise if it doesn't exist download what's on the ftp account.

krunal 10-20-2005 04:43 AM

In this case i will have to know when the client uploads the file and accordingly create that lock file. But i don't know that. He can upload anytime, any number of files.


All times are GMT -5. The time now is 10:36 PM.