Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Renaming Files with error trapping
Message
De
14/08/2008 09:22:40
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Divers
Thread ID:
01338855
Message ID:
01338862
Vues:
17
There may be a better way to do it these days but you could use FOPEN to try and get a file lock.

Jon

>Hello, I have a document management module of my application and part of it requires taking file MyFile.txt and renaming it to Last_Name_First_Name_Date.txt.
>
>I use the VFP Rename function and trap for the existence of the source and also the destination, but get caught up in situations where the user has the file open ...
>
>Anybody have any suggestions on how to handle this type of situation (or similar ones while we're at it, like maybe the original file is read-only, etc.)
>
>Thanks
>
>Kevin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform