Dave S schreef:
> Due to some sloppy programming on a commercial app :) I have a problem.
> 
> I have some directories on an XP machine, I need to know which of these 
> directories (*.cab_tmp) contains a file that that is being accessed by 
> another XP program.

To me the easiest solution seems to be using Process Explorer or Handle 
from Sysinternals (at http://www.microsoft.com/technet/sysinternals 
currently).

At first sight your Python solution looks good to me; I don't know why 
it doesn't work.

Another approach I have used in the past is trying to rename the 
directory instead of trying to open a file in that directory: Windows 
cannot rename the directory when some program has a file open in that 
directory. At least that's my experience.

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to