|
-
Apr 8th, 2001, 10:56 PM
#1
Thread Starter
Frenzied Member
-
Apr 8th, 2001, 11:04 PM
#2
Code:
' assumes you are looking in a specific directory, say strDirectory = "C:\"
If Dir$(strDirectory & ListView1.SelectedItem.Text, vbNormal Or vbHidden Or vbArchive Or vbSystem Or vbReadOnly) Then
MsgBox "File"
ElseIf Dir$(strDirectory & ListView1.SelectedItem.Text, vbDirectory) Then
MsgBox "Folder"
End If
should work...
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Apr 8th, 2001, 11:21 PM
#3
PowerPoster
Or this, which you can change to fit your needs.
Code:
Private Sub Command1_Click()
If GetAttr("C:\test") = vbDirectory Then
MsgBox "Directory"
ElseIf GetAttr("C:\test.txt") = vbNormal Then
MsgBox "File"
End If
End Sub
-
Apr 8th, 2001, 11:28 PM
#4
another one of those damn functions that I didn't know about!! Megatron told me about SetAttr() or Save Attr() I forget which is right, I gues it only stood to reason that a Get Attr() function existed...Thanks for the info, Lethal
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Apr 8th, 2001, 11:29 PM
#5
PowerPoster
No problem, the one Megatron was referring to was SetAttr() function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|