Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple way to check for and create a directory in VB
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00564166
Message ID:
00565548
Views:
14
I don't think it necessary to check if the path exists before create it. Instead, you'd better do some error handling by using On Local Error in VB6 or Try...Catch in VB.net. The reason for doing so is that we can treat the "Path already exists" as a sort of error as well as "Failed to create a new directory". So you needn't perform the check - just let the error handler code do it. It may speed up your code in some cases.
Previous
Reply
Map
View

Click here to load this message in the networking platform