Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ftp upload completion 1

Status
Not open for further replies.

arcnon

Programmer
Aug 12, 2003
242
0
0
US
I am checking my ftp directory ever second. I looks to see if a file is there. How through perl can I find out if the upload has finished so that it can be moved or transferred to a differant server?
 
On NT, the FTP process should have a lock on the file, so if you go to move it you'll get an error

HTH
--Paul
 
Thanks Paul,

Where would the lock file reside when the ftp function is happeneing?

Jimbo
 
Jimbo,

The lock is not a file, it's something maintained by the operating system, just like in UNIX.

Have a look at the lock() function in the Perl documentation. The logic of what you're doing might look like this:

whilst I can't lock the file
begin
sleep for one second
end


Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top