LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-20-2005, 02:14 AM   #1
krunal
LQ Newbie
 
Registered: Apr 2005
Posts: 14

Rep: Reputation: 0
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.
 
Old 10-20-2005, 03:38 AM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Ruhr Area, Germany
Distribution: Slackware64 14.0
Posts: 1,517

Rep: Reputation: 90
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.
 
Old 10-20-2005, 04:43 AM   #3
krunal
LQ Newbie
 
Registered: Apr 2005
Posts: 14

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
locking a file permanently sooraj_pathe Linux - General 1 03-11-2004 01:58 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM
File locking over Samba rtaft Linux - Software 0 12-30-2003 11:02 AM
File locking in Linux xailer Programming 5 12-29-2003 02:00 PM
python; file locking TheLinuxDuck Programming 22 08-05-2003 05:47 PM


All times are GMT -5. The time now is 01:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration