[Tutor] exception not raised XP file ?

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Sat Nov 18 17:08:10 CET 2006


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



More information about the Tutor mailing list