V
Vai2000
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
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