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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can you tell when a remote file copy has finished?

Status
Not open for further replies.

kotahi

Programmer
Joined
May 14, 2003
Messages
2
Location
NZ
I have apple mac clients copying files and directories(some quite large) to a "hot folder" on a 2000 server. I would like to process these files when they have finished copying.

The file is listed as writable at all times during copying as well.

The difficulty is telling when a copy has finished.

I have tried to get the file size, but I get the file properties instead of the actual size even while copying. I have tried to read an EOF, this trashes the original file! Any advice welcome....delaying the process can work but is messy with large dirs.

Thanks
 
Well, there are two possibilities to to "see" if the file is accessed/copied or not.
one on the server side, and anothr one on the client side.
1. On the server there is command &quot;net file <name of the file>&quot;
this will tell you if the file is opened by someone or not.
So, you can do a sort of
net file myfile.txt >> result.txt
then with another script to analyse result.txt
if is emtpy, then the file is not accessed.
Disadvantage: how do you know when to lauch that batch file

2. client side. here is easier. a batch file that execute them line by line. so, after copy procedure was ended, you call a small application (is your choice here) that will do somethign then (send a message, send an email,..)


Gia Betiu
gia@almondeyes.net
Computer Eng. CNE 4, CNE 5, MCSE Win2K
new: (just started)
 
Thanks for the quick response....but...
This does not appear to work. I'm not sure why. The manual indicates it should. The remote copy is not listed if I run &quot;net file&quot; while the file is copying.

I have tried a local copy on the server and while copying it does not list in &quot;net file&quot; either.
Thanks again
 
yes, you are right.
but anyway, the best solution is on the client side.
that one will tell you exaclty when the procedure finished.

Gia Betiu
gia@almondeyes.net
Computer Eng. CNE 4, CNE 5, MCSE Win2K
new: (just started)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top