Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to delete a file in VB6 without using filesystem obj
Message
 
À
26/07/2000 02:34:22
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00396924
Message ID:
00396979
Vues:
13
>Hi! I need some help. A friend of mine is developing an application in VB6 that creates a text file with some info in it extracted from a database. The problem is that there are times when the database is empty and the system is left with a text file that contains nothing in it. How do we delete this file? We're thinking of issuing a command similar to the dos Delete command, e.g. (run at dos prompt) c:\del mytext.txt
>
>Any ideas how to do this? Someone suggested using shell command but we don't know how. Would greatly appreciate any sample code. Thanks!
>
>Ramon Carlos

You simply use the VB Kill statement like this:
Kill "*.TXT"
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform