How to Run Shell Commands from Oracle Forms?

To run shell commands from Oracle Forms, use /bin/ directory as a source in the Linux or Unix environment. The following is the example:

Run Shell Command from Oracle Forms Example

Suppose you want to run mv command to move a file from one directory to another. Then use the host command as following:
host('/bin/mv /user01/myfiles/abc.txt /user01/oradocs/abctxt', no_screen);

If the file is too large, then it can take time to move from one folder to another, and in this case, Oracle Forms will be engaged until the command finish. So to run a command in the background put ampersand (&) in the end of the command. Below is the example:
host('/bin/mv /user01/myfiles/abc.txt /user01/oradocs/abctxt &', no_screen);
Execute Shell commands from Oracle Forms example.

Learn through an example to execute/run shell commands from Oracle Forms using host command.