This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

quick way to find out if a file is in use by windows?


I use the mv command to clean up some directories filled with temporary
files. These may or may not be in use by windows.

I used to detect them being in use by windows by mv failing.

Now, mv is simply taking forever.

I'm using cygwin 1.7.7(0.230/5/3), windows 2003 server 32 bits with all
updates on a local NTFS disk.

I remember reading something about this changing in the last release, but
I can't find it in the archives anymore (searching for 'file in use'
didn't work out).

Is there any way to detect if a file is in use by windows before
executing 'mv' (I really, really hope I don't have to use the
'handle.exe' utility, which takes seconds for each file...)?

Alternatively, could mv timeout somewhat earlier? I control-C'ed it
after 15 minutes, which is really too long already.

Thanks,
Jurriaan
-- 
"You want to save them all, ATerafin?" She laughed, and the laugh
was chilling. "Try, try with my blessings." There was no question
whatever to Margret that the words were a curse, meant to cause
pain; they implied certain failure, and the amusement of the
powerful at the pathetic struggles of those doomed to fail.
	Michelle West - The Shining Court

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]