?
Solved

Need a Directory Browser

Posted on 2002-05-17
4
Medium Priority
?
140 Views
Last Modified: 2010-05-02
I am looking for a good directory browser. I have seen the ones at http://www.experts-exchange.com/questions/Q.20111547.html. However, I could never get any of these to browse the network. The network icon was in the tree but it would never show any of the workstations. Anyway, I would like one that provides a way for you to make a new folder. Willing to purchase one if necessary.

Thanks
0
Comment
Question by:EEI
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Expert Comment

by:ventond
ID: 7017845
Why not use the Microsoft Windows Common Dialog Control?
It ships with windows and it's free.
0
 
LVL 12

Accepted Solution

by:
jgv earned 400 total points
ID: 7017851
I tried out the demo that comes with this, looks like it should do what you want.

http://www.mvps.org/ccrp/controls/ccrpbdsvr6.htm
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7017924
Why don't you use browse for folder as Windows does?
' you culd modify to return last backslash or not:

Option Explicit
'--------------------------------------------------------------
' Copyright ©1996-2001 VBnet, Randy Birch, All Rights Reserved.
' Terms of use http://www.mvps.org/vbnet/terms/pages/terms.htm
'--------------------------------------------------------------


Public Type BROWSEINFO
  hOwner           As Long
  pidlRoot         As Long
  pszDisplayName   As String
  lpszTitle        As String
  ulFlags          As Long
  lpfn             As Long
  lParam           As Long
  iImage           As Long
End Type

Public Const BIF_RETURNONLYFSDIRS = &H1
Public Const BIF_DONTGOBELOWDOMAIN = &H2
Public Const BIF_STATUSTEXT = &H4
Public Const BIF_RETURNFSANCESTORS = &H8
Public Const BIF_BROWSEFORCOMPUTER = &H1000
Public Const BIF_BROWSEFORPRINTER = &H2000
Public Const MAX_PATH = 260

Public Declare Function SHGetPathFromIDList _
  Lib "shell32.dll" Alias "SHGetPathFromIDListA" _
 (ByVal pidl As Long, _
  ByVal pszPath As String) As Long

Public Declare Function SHBrowseForFolder Lib "shell32.dll" _
  Alias "SHBrowseForFolderA" _
 (lpBrowseInfo As BROWSEINFO) As Long

Public Declare Sub CoTaskMemFree Lib "ole32.dll" _
  (ByVal pv As Long)



Public Function BrwFolder() As String

 Dim bi As BROWSEINFO
 Dim pidl As Long
 Dim path As String
 Dim pos As Integer

'Fill the BROWSEINFO structure with the
'needed data. To accomodate comments, the
'With/End With sytax has not been used, though
'it should be your 'final' version.

'hwnd of the window that receives messages
'from the call. Can be your application
'or the handle from GetDesktopWindow().
 bi.hOwner = 0 'Me.hWnd

'Pointer to the item identifier list specifying
'the location of the "root" folder to browse from.
'If NULL, the desktop folder is used.
 bi.pidlRoot = 0&

'message to be displayed in the Browse dialog
 bi.lpszTitle = "Select your Folder"

'the type of folder to return.
 bi.ulFlags = BIF_RETURNONLYFSDIRS
 
'show the browse for folders dialog
 pidl = SHBrowseForFolder(bi)

'the dialog has closed, so parse & display the
'user's returned folder selection contained in pidl
 path = Space$(MAX_PATH)
   
 If SHGetPathFromIDList(ByVal pidl, ByVal path) Then
    pos = InStr(path, Chr$(0))
    BrwFolder = Left$(path, pos - 1) & "\"
 End If

 Call CoTaskMemFree(pidl)
 
End Function

To create a new folder, just use mkdir function.
0
 

Author Comment

by:EEI
ID: 7018106
Thanks igv, that is perfect. It is exactly what I was looking for!

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question