Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Safe way to delete files
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Safe way to delete files
Divers
Thread ID:
00603620
Message ID:
00603620
Vues:
50
Hi everybody,

I have the following lines of code:
lcFiles=forceext(m.tcSourceFile,"*")
copy file (m.lcFiles) to (m.lcBackUpDir+"\*.*")
delete file (m.lcFiles)
If one of the file is opened by someone anywhere, I got an error message, which is trapped by our Error Handler...

What would be a safer way to move files to another directory, but not throw an error, if files could not be moved (May be custom notification message)?

Thanks in advance
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform