Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getdir() across Network
Message
From
25/05/2001 11:38:38
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00511371
Message ID:
00511574
Views:
19
Thanks to all - and the article looks very useful. I'll study it in detail after this.

After testing, I came up with
procedure getnetdir

lparameters inprompt

* Gets directory including those on a network
* Returns empty string if no selection made, name otherwise

if empty(inprompt)
	inprompt = "Please Select folder"
endif

Declare integer GetActiveWindow in WIN32API
oShell = createobject("Shell.Application")
oFolder = oShell.BrowseForFolder(GetActiveWindow(), inprompt, 0 )

returnpath = ''

if (! isnull(oFolder)) and type('ofolder.items') = 'O'
	returnpath = addbs(oFolder.Items.Item.Path)
endif

if ! directory(returnpath)
	returnpath = ''
endif

return returnpath
Mike
Regards

Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform