Overblog Suivre ce blog
Editer l'article Administration Créer mon blog

Search

Free tool

Look and Feel Project

21 décembre 2006 4 21 /12 /décembre /2006 10:50

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:

   - WEBUTIL_HOST.Blocking()
   - WEBUTIL_HOST.Get_Standard_Output()


Webutil Host with Standard Ouput

You can get the WEBUTIL_HOST 9.0.2 sample dialog here

Partager cet article

Repost 0
Francois Degrelle - dans Oracle Forms
commenter cet article

commentaires