WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Dialog Editor
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Use FileListBox to Display Directories Only in the Dialog Editor

Keywords:      FileListBox   IntControl(4,

Question:

In one of my Wil Scripts the user should choose a directory. Is it possible to set up the AskFileName function in a way he can choose a Directory and not a File?

Answer:

Here's the closest thing...
IntControl(4, 0, 0, 0, 0)
disks=`c:\*.`
HomeDirDialogFormat=`WWWDLGED,5.0`
HomeDirDialogCaption=`Choose the directory`
HomeDirDialogX=284
HomeDirDialogY=85
HomeDirDialogWidth=159
HomeDirDialogHeight=118
HomeDirDialogNumControls=3
HomeDirDialog01=`6,16,80,54,FILELISTBOX,disks,DEFAULT`
HomeDirDialog02=`62,84,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Ok",1`
HomeDirDialog03=`6,2,148,DEFAULT,VARYTEXT,disks,""`
ButtonPushed=Dialog("HomeDirDialog")

disks=DirGet() ;;;;;;;;;;Da magic
message(`You chose`,disks)

Article ID:   W12841
Filename:   FileListBox to Display Directories Only.txt
File Created: 1999:04:15:16:50:00
Last Updated: 1999:04:15:16:50:00