Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two old computers A and B, which are running Windows XP and connected to the same LAN with shared folder created. Computer A shares a folder to all computers on the same LAN.

About every 10 seconds, computer B will transfer a 3-MB file (always named rpme.dat) over the LAN to the share folder. This is done by a 3rd-party application. I don't have any control over that.

In computer A, I developed a program to poll if the file rpme.dat exists or not. If so, the program will copy rpme.dat to other folder and rename it. However, sometimes when it detects the existence of the file, it doesn't mean the file transferring is done. So sometimes my program copies the partially-saved file instead of the whole one. I don't understand why. The LAN is pretty fast and the file is just 3 MB. Is there any way to boost the speed of the file transfer or any faster way to share the file over the LAN?

P.S. If I have my program in computer wait 5 seconds before copying the file, it works pretty well; 99% of the time I will get the whole file copied. But for some reason, I cannot always wait that long.

share|improve this question
    
so your reasoning is that by transfering the files more quickly, you have more time to detect and copy the file? unfortunately, usually the answer to faster file transfer over the network is faster disk IO. in your case, since you are working with old hardware, you most likely have limited options. how does your detect-n-copy app notice the new file? are you checking on a specific interval, or are you using a framework object of some kind? –  Frank Thomas Dec 2 '13 at 5:45
    
thanks for the reply. The 3rd application will send a signal (logic "1" via an specific external cable to notify that a new file is being saved), and my code is waiting for the signal "1" at that cable port. This process is fast. However, it only notify when the file saving start, it doesn't tell when it finished. –  user1285419 Dec 2 '13 at 6:00
1  
you might want to look into using a .net filesystemwatcher or a java watchservice component (I don't know what runtime you are programing against) to get a signal when the file is done writing instead of having to guess as to when it will be done. –  Frank Thomas Dec 2 '13 at 6:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.