Can a file already in use be cloned in VB.NET?
Is it possible to load a file into memory even if that file is already in use by another program?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It should be possible, but only if the other application doesn’t have the file open with a file share mode of None or “exclusive” Write (FileShare.None or FileShare.Write in .NET)
Here is a list of possible windows file sharing modes. It is for C++, but the same principles apply across the board since file sharing is an operating system level concept.
For .NET, the same principles apply. See the FileShare enumeration (although the discussion from the link above is more useful to understand what types of file locks are involved with the different types of file share modes)