how to Get Folder Name VB6!!!
this is my problem, i need to look in a particular directory with folder names as dates in this format
08132007
08122007
08112007....
etc
i need to check the directory these folders exist in and look for the folder that matches todays date... i'm new to VB6 and i am unlear on how to do this.
can someone please help!!?
Re: how to Get Folder Name VB6!!!
Try this
Code:
Private Sub Command1_Click()
Dim strLoad As String
Dim strDate As String
strDate = Format(Now, "mmddyyyy")
List1.Clear
strLoad = Dir("d:\*.*")
Do While strLoad > vbNullString
If strDate = strLoad Then 'we have a match
'do something
End If
strLoad = Dir
Loop
End Sub
Re: how to Get Folder Name VB6!!!
when i try that code its returning file names, instead of folder names.
Re: how to Get Folder Name VB6!!!
i need to return folder names instead of filenames please help!
Re: how to Get Folder Name VB6!!!
Code:
'change
strLoad = Dir("d:\*.*")
'to
strLoad = Dir("d:\*.*\", vbDirectory)
1 Attachment(s)
Re: how to Get Folder Name VB6!!!
excuse the mistakes, its 3am here.
EDIT: Hack got in before me <_< sorry