Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple way to check for and create a directory in VB
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00564166
Message ID:
00564209
Vues:
23
This message has been marked as the solution to the initial question of the thread.
>Hi,
>
>I know how to do this in VFP, but not too sure in VB - so, I'm hoping that someone will point me in the right direction. As an example. let's say that I want to check for the exisitence of apppath + '\Export' - and if the Export subfolder doesn't exist, then create it. What would be the best approach?
>
>TIA, Al

You can also use the FileSystemObject object:
Set FSO = New Scripting.FileSystemObject
If Not FSO.FolderExists("c:\mypath") Then
   FSO.CreateFolder "C:\mypath"
End If
You need to add a reference to MS Scripting Runtime. HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform