|
-
May 25th, 2004, 07:15 AM
#1
Thread Starter
Member
Check if file or folder *RESOLVED*
Hello,
I need to check if a path specified is file or folder/volume... all "FileExists" functions I found return True if I pass them a folder path... how do I check if path is folder or file?
thanks in advance,
Darko
Last edited by Darkolord; May 25th, 2004 at 07:38 AM.
-
May 25th, 2004, 07:27 AM
#2
If you have at least IE4, you can use PathIsDirectory...
VB Code:
Private Declare Function PathIsDirectory Lib "shlwapi.dll" Alias "PathIsDirectoryA" (ByVal sPath As String) As Long
Private Sub Command1_Click()
MsgBox CBool(PathIsDirectory("c:\users"))
End Sub
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
May 25th, 2004, 07:38 AM
#3
Thread Starter
Member
Perfect...
thanks!
-
May 25th, 2004, 12:35 PM
#4
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
|