Overblog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU

Articles Oracle Forms, PL/SQL, Java, J2EE

Publicité

Forms and Webutil : Get the standard output of a system command

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
Publicité
Retour à l'accueil
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article