croag
asked on
Will This piece of code Check to see the directory ex
I acutally used a reference from this site but I wanted to make sure and I honesly can't test it right now, Please let me know for an easy 50 pts. Thanks!
Public compiledpxp As String = "c:\cytodata\compiledpxp"
Public save As String = "c:\cyotodata\save\origina lpxp"
If Not Len(Dir$(compiledpxp, vbDirectory)) > 0 Then
Len(CObj((Dir$(compiledpxp , vbDirectory))).Createdirec tory(compi ledpxp))
ElseIf Len(Dir$(save, vbDirectory)) > 0 Then
Len(CObj((Dir$(save, vbDirectory))).Createdirec tory(compi ledpxp))
End If
Public compiledpxp As String = "c:\cytodata\compiledpxp"
Public save As String = "c:\cyotodata\save\origina
If Not Len(Dir$(compiledpxp, vbDirectory)) > 0 Then
Len(CObj((Dir$(compiledpxp
ElseIf Len(Dir$(save, vbDirectory)) > 0 Then
Len(CObj((Dir$(save, vbDirectory))).Createdirec
End If
It looks like Vb 6.0 to me
heres a .Net version that does the same thing
Dim finfo As New System.IO.FileInfo("C:\tem p\mydocume nts\mfile. exe")
Dim dir As System.IO.DirectoryInfo = finfo.Directory
If Not dir.Exists Then
dir.Create()
MessageBox.Show("Directory created")
Else
MessageBox.Show("Directory exists")
End If
heres a .Net version that does the same thing
Dim finfo As New System.IO.FileInfo("C:\tem
Dim dir As System.IO.DirectoryInfo = finfo.Directory
If Not dir.Exists Then
dir.Create()
MessageBox.Show("Directory
Else
MessageBox.Show("Directory
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
but there are no syntactical errors in the actual code.....how could this be?
>> syntactical errors
Thats not the be all and end all. There can be other reasons that will cause it not to work. How did the code go that I posted
Thats not the be all and end all. There can be other reasons that will cause it not to work. How did the code go that I posted
ASKER