Re: File IO Error!!!
From: Jared Parsons [MSFT] (jaredpar_at_online.microsoft.com)
Date: 06/11/04
- Next message: Daniel Jin: "Re: Why isn't Dispose() implemented in the compiler?"
- Previous message: Lex: "DrawString - Drawing MenuItem Text with Underline Mnemonic?"
- In reply to: Vai2000: "File IO Error!!!"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 11 Jun 2004 10:09:55 -0700
This means that some process has this file opened already. Do you use this
file anywhere else in your process? If so, make sure that you close this
file when you are done with it.
Otherwise, go to www.sysinternals.com and download handle.exe. This will
allow you to see which process has that file open.
-- Jared Parson [MSFT] jaredpar@online.microsoft.com This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Vai2000" <nospam@microsoft.com> wrote in message news:eJaL#l8TEHA.808@tk2msftngp13.phx.gbl... > Hi All, I am using File.Copy operation inside my program. I am running into > this error, any clues how to fix this? > I am using this syntax for reading the file > freader = new FileStream(this.fileName, FileMode.Open, FileAccess.Read, > FileShare.ReadWrite); > >>>>>>>>> > The process cannot access the file "c:\temp\foo.txt" because it is being > used by another process. > Stack Trace: > at System.IO.__Error.WinIOError(Int32 errorCode, String str) > at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess > access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, > Boolean bFromProxy) > at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess > access, FileShare share) > >>>>>>>>> > > TIA > >
- Next message: Daniel Jin: "Re: Why isn't Dispose() implemented in the compiler?"
- Previous message: Lex: "DrawString - Drawing MenuItem Text with Underline Mnemonic?"
- In reply to: Vai2000: "File IO Error!!!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|