Sometimes I see questions about how to get the file list of a local directory. The standard answer is to proceed a Host() command that use the DIR command with a redirection to a file:
Host('cmd /c dir /b c:\*.jpg > c:\list_file.txt');
When the file is created, you have to open it with the CLIENT_TEXT_IO webutil package to get the lines from the file, then after delete this temporary file.
All this can be simply done with Webutil if you use functions of the WEBUTIL_HOST package:
You can get the WEBUTIL_HOST 9.0.2 sample dialog here