Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Sep 10, 1998



Application Security Testing: An Integral Part of DevOps

Easily Create All Directories in a Path

Use this code to create a tree of folders on Windows 95 or NT 4.0 in one line:
 Private Declare Function _
	MakeSureDirectoryPathExists Lib "IMAGEHLP.DLL" _
	(ByVal DirPath As String) As Long
Private Sub Command1_Click()
	Dim MyPath As String
	Dim bResult As Long
	'Specify the directory that we need
	MyPath = "C:\Win95\Temp\MyFolder\" & _
	'Now create that directory if it does exist. 
	'The entire path will be created if needed 
	bResult = MakeSureDirectoryPathExists(MyPath)
	'Test for failure
	If bResult = 0 Then
		MsgBox "MakeSureDirectoryPathExists failed!"
	End If
End Sub
Mordechai Eli
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date