Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File.Copy and lock file
Message
De
19/02/2014 11:22:20
 
 
À
19/02/2014 11:13:46
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01594636
Message ID:
01594668
Vues:
29
>No. If you have overwrite 'true' then the fact that the destination already exists should not be a factor. See the code Gregory posted - an exception can be thrown if permissions fail.

I have overwrite there but the directory is always empty when I start my copy. So, the overwrite flag is not a factor here. The initial transaction is the copy. While it is in progress, the other program succeeds to take a hook to start copying that file somewhere else but the copy I am doing is not finished yet. This is what I am wondering if the CopyFile() is really locking the file or while the copy is in progress, anyone can get a hold of it.

IAC, I have adjusted to copy the file as lcFile+".TMP" and then I rename it to lcFile.

>What's the errorCode in WinIOError() ?

I do not have it.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform