Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Safe way to delete files
Message
De
12/01/2002 10:41:06
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00603620
Message ID:
00603916
Vues:
22
>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

Would the DOS command work? COPY or XCOPY. I am not sure whether an error message would interrupt the process or not Perhaps you can try it.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform