|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > UserInterface > DBWListFiles |
Shows a dialog box that allows to choose between file names retrieved from a folder.
Function DBWListFiles(Title, FileDirectory, FileNameFilter, FileExtension)
Parameters
Title |
the dialog box title |
|---|---|
FileDirectory |
the folder to search into |
FileNameFilter |
a filter to apply to file names |
FileExtension |
the file extenision required |

The function returns the name of the chosen file.
The function search starting from the specified folder.
This means that it will show every file (matching criteria) present in subfolders too.
In the picture above, you can see more than one entry for the same file.
This because the same file is present both in DBWorks\LST\ and DBWorks\LST\Demo_LST\ folders.
Function DBWList
Function DBWListFromFile
Function DBWListFromQuery
Sub main()
DBWinit(true)
FileDirectory="c:\program files\dbworks\lst"
FileNameFilter="dataentr_" ' string to be searched in filename (any position)
FileExtension="*.LST"
Title="Select coding script"
ff=DBWListFiles(Title,FileDirectory,FileNameFilter,FileExtension)
DBWMsgBox ff
End Sub