By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,018 Members | 894 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,018 IT Pros & Developers. It's quick & easy.

"File is being used by another process" - error

P: n/a
Hi all,
I was getting this error when trying to move files on a FileSystemWatcher
notification (with in a Windows Service). To fix this, I implemented a
FileWaiter class to wait for the file to be ReadWrite accessible, and that
worked fine on two PCs (Windows XP Pro SP2 & Windows XP Pro). But when I
tried this on my third PC that had Windows XP Pro SP1 installed, it would
not work. The file that was copied to folder was never accessible, after
being seen by a FSW. It looks like something was keeping a handle on it, but
I couldn't figure out what. Could it be some weird setting on Windows XP,
such as "Simple File Sharing"?

Any ideas?

Thanks
Goran
Sep 20 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Goran,

You can use FileMon (http://www.sysinternals.com/Utilities/Filemon.html) to
find which process is opening the file: menu "Find/Find Handle..." and type
in the file name. This will list which processes are accessing the file.

Also, if you could decribe more your program logic or post some code, we
may have a clearer understanding of the problem.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 20 '06 #2

P: n/a
Hi Walter,
The problem seems to have disappaered, after I rebooted the machine
yesterday. I will re-post if it happens again. Thanks for the link on
FileMon.

Goran

"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:d3**************@TK2MSFTNGXA01.phx.gbl...
Hi Goran,

You can use FileMon (http://www.sysinternals.com/Utilities/Filemon.html)
to
find which process is opening the file: menu "Find/Find Handle..." and
type
in the file name. This will list which processes are accessing the file.

Also, if you could decribe more your program logic or post some code, we
may have a clearer understanding of the problem.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your
reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Sep 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.