MkDir Command - how to use with the filename
I need to use the MkDir Command when the string contains the required directory to be made and the filename.
e.g. I want to create a directory 'Directory1'
Code:
Dim fileLocation as String
fileLocation = "C:\Root\Directory1\file1.txt"
MkDir fileLocation
But I keep getting a Run-time error '76' Path not found. I know this is because I have the filename included in the string. How can I include the filename in the string without running into error?
Note: The file doesn't have to be created just the directory
Re: MkDir Command - how to use with the filename
Quote:
Originally posted by mel_flynn
I want to create a directory 'Directory1'
Note: The file doesn't have to be created just the directory
:p