I'd like to check to see if a specific directory exists, and, if it doesn't exist, create it. What's the easiest way to do this? Also, what's the easiest way to check if a file exists? Thanks.
Printable View
I'd like to check to see if a specific directory exists, and, if it doesn't exist, create it. What's the easiest way to do this? Also, what's the easiest way to check if a file exists? Thanks.
The System.IO namspace has all the I/O related classes, like File and Directory, which are the ones of interest in this case. The My.Computer.FileSystem object in VB 2005 also has methods that will be of use.