Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File opened by another program
Message
De
15/08/2001 08:52:42
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
15/08/2001 06:12:07
Harry Wit, De
VGZ Zorgverzekeraar
Arnhem, Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00543951
Message ID:
00543988
Vues:
13
>How can I track if a file is opened by another program, before I delete it.

You could also just go ahead and delete it, and use ON ERROR to see whether it was really deleted or not.

Something like:
local lcError, llDeleteFailed
lcError = on("error") && save current error handler
on error llDeleteFailed = .T.
erase MyFile
on error &lcError
if llDeleteFailed
  MessageBox("Can't delete file.")
endif
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