Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple way to check for and create a directory in VB
Message
From
04/10/2001 11:44:42
Evans Carl
System Answers Consulting, Inc
Big Lake, Minnesota, United States
 
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00564166
Message ID:
00564211
Views:
16
>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

There is another way to do this pretty easy. There is a object called Microsoft Scripting Object named scrrun.dll. Just make a reference to this object

dim fs as new FileSystemObject
Set fs = New FileSystemObject

If Not fs.FileExists(App.path & "\log\ProgErrLog.txt") Then
fs.CreateTextFile App.path & "\log\ProgErrLog.txt", True
End If

Hope this helps
¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°¤º°`°º¤ø¤º°¤º°
Carl Evans
CEO & President
System Answers Consulting, Inc.
MCSD .NET, ASP.NET, C#.NET, VB.NET,
Previous
Reply
Map
View

Click here to load this message in the networking platform