Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File.Copy and lock file
Message
From
19/02/2014 02:51:46
 
 
To
18/02/2014 21:33:49
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01594636
Message ID:
01594642
Views:
46
>Is it possible that such a command does not lock the file?
>
>
>File.Copy(cSource, cDestination, lOverwrite)
>
>
>I am copying a file into a directory and in the middle of the copy, I have an access is denied. We believe this is because someone else took over the file. But, I assumed File.Copy would have locked the file during the process of the copy.

Not sure what you mean by 'in the *middle* of the copy' ?

If you are getting the UnauthorizedAccessException then, as Gregory suggests, I'd take it at face value and look at the permissions.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform