> From: Alex Rufon
> 
> What I was really asking if we have existing code to for Directory
> Open/Selection Dialog. Not specifically under "wd". Was hoping for a
> cross platform solution though.

The dirbrowse script/verb does the trick for Windows, but I'm not aware of any 
elegant cross-platform solution.

I've used the following "hack" in the past, which is cross-platform:

NB.*dirselect v directory selection dialog
NB. y = DOS filespec or ''
NB. x = optional file type list
NB. returns user selection
dirselect=: 'Choose folder -- ignore filename'&$: : (4 : 0)
y=. y,(0 e. #y)#'*'
path=. }: y #~ b=. +./\.y=PATHSEP_j_
def=. y #~ -. b
def=. (0<#def){:: 'ignore filename';def
t=. 'mbopen "Choose Folder" "',path,'" "',def,'" '
t=. t,'"',x,'"'
t=. t,' ofn_pathmustexist;'
getpath_j_ wd 8 u: t
) 

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to