Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UNC Version of GetFile() and GetDir() 1

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
0
16
US
Hi,

I'm moving away from mapped drives and just discovered that getfile() and getdir() has to be replaced, because they don't support unc navigating to get a file name or folder path on a system that has NO mapped drives...

Has anyone here solved this with win32 api functions, or something else? Thanks for any discussion and links.

Thanks,
Stanley
 
GETFILE() gives access to the Network and all available shares, and returns a UNC path if selected by the user.

For GETDIR(), use the BIF_NEWDIALOGSTYLE flag, and also returns a UNC path.
 
In what sense do you mean that those functions don't support navigating with UNC paths?

With GETFILE(), you don't pass a path to the function. But within the dialogue, you can navigate to a network drive, and it will return a filename with the UNC path.

With GETDIR(), you can pass a UNC path and it will open the dialogue with that path selected. You can then navigate within that path in the usual way.

As far as I can see, both of the above work on machines without any mapped drives.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi,

More specifically, I do not see a way to TYPE in a unc path (or a starting path, for Window's auto-completion to kick in) into the getfile() dialog for uncs' not found in the network neighborhood. We only use hidden shares (share$) and those shares do not show up in the dialog's gui and does not allow for their entry. This functionality is what is needed. How do I work around that? Sorry for the incompleteness of my question.

Thanks,
Stanley
 
You can type \\share into the file name input textbox of the GetFile() dialog, that should work.

Bye, Olaf.
 
Perfect... Works as needed...

Thanks Olaf
Stanley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top