Try this Nick.
Lorne
' ************ '
' WINDOWS API FUNCTION DECLARATION
' to allow access to the system
' MakeSureDirectoryPathExists utility
' ************ '
Declare Function MakeSureDirectoryPathExists Lib "IMAGEHLP.DLL"
(ByVal DirPath As String) As Integer
Declare Sub Main()
Declare Function Create_Directory (byVal NewPath as String) As Logical
' ************ '
Sub Main()
Dim DirectoryCreated as Logical
DirectoryCreated = Create_Directory ("C:\Test\")
End sub
' ************ '
Function Create_Directory (byVal NewPath as String) As Logical
' http://www.freevbcode.com/ShowCode.asp?ID=5618
If Right$(NewPath,1) <> "\" Then
NewPath = NewPath + "\"
End If
' Call API
' MakeSureDirectoryPathExists(NewPath) will create the directory
' NewPath if it does not already exist.
If MakeSureDirectoryPathExists(NewPath) <> 0 Then
' No errors, return True
Create_Directory = True
Else
Create_Directory = False
End If
End Function
' ************ '
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: December 14, 2005 7:15 PM
To: [email protected]
Subject: [MI-L] make a directory
One very useful command would be the command to make a directory.
Currently I have to;
1) write a batch file containing the command to make a directory
2) execute the batch file
3) delete the batch file again
nick
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l