Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have an application that creates a folder with files on a remote machine, and a python script that looks for this folders from a local machine using its full UNC name and responds accordingly (for example, the script looks for the folder \\remote-host\D$\our_cool_application_output_folder from a local host).

There is a significant delay (around 5 seconds) from the actual appearance of this folder on the remote machine until the script can see it. It hurts the performance of our application. During the delay the script attempts to repeatedly access this folder (4 times per second) until it succeeds.

Is there any way to allow the local machine see the remote folder more quickly? Is there a way to reduce this "update time" to a few milliseconds?

share|improve this question
You could rewrite parts of Windows... – Ignacio Vazquez-Abrams Aug 5 '12 at 7:11

Instead of checking for the file repeatedly, ask Windows to notify you as soon as it arrives using FindFirstChangeNotification. By checking for the file repeatedly, you force the absence of the file into cache, preventing the file from being noticed.

Windows will only check so often and the redirector has a cache. The worst possible thing you can do is ask for a file right before it appears. That ensures you have to wait out the whole negative cache validity interval to find the file.

You can disable some of these caches, but performance of bulk file I/O will suffer terribly. Really, you just shouldn't use files this way.

share|improve this answer
Do you know of any other way we can use to watch for files, except for windows file sharing? – Alex Aug 5 '12 at 11:32
I would recommend either FindFirstChangeNotification, running a program to watch for the file on the server itself, or not using a file for this at all. – David Schwartz Aug 5 '12 at 11:34

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.