|
Creating folders dynamically
Dim MyPath, MyName As String
MyPath = Request.PhysicalApplicationPath & "images\user\" & Format(Now, "dd_MM_yy") ' Set the path.
MyName = Dir(MyPath, vbDirectory) ' Retrieve the first entry.
Try
If MyName = "" Then ' The folder is not there & to be created
Dim objDir As New DirectoryInfo(Request.PhysicalApplicationPath & "images\user\" & Format(Now, "dd_MM_yy"))
objDir.Create()
End If
i am getting an error:-
Could not find a part of the path "d:\".
Is there a special way to create folders within the website?
the code above works fine on my own machine
|