/
Invoking External Programs

Invoking External Programs

In this article, you will learn how to execute an external application - for example, run a command line, execute scripts, or interact with the operating system.

The behaviour and syntax will differ a little depending on your operating system — Windows/Linux/macOS. The examples documented here are on a Windows machine.

Using os.execute() allows you to execute external programs. This code snippet shows some of the syntax you can use:

Screen Shot 2024-09-30 at 11.25.46 AM.png

io.popen() is helpful in that it allows you to open a command line process and read and write to it. This shows an example of reading into a directory using a command:

Screen Shot 2024-09-30 at 11.37.53 AM.png

For more details, see io.popen().

Related content

How to Connect to SFTP and FTP
How to Connect to SFTP and FTP
Read with this
io.popen()
More like this
Parsing and Serializing JSON
Parsing and Serializing JSON
Read with this
What is io.popen?
What is io.popen?
More like this
Working with XML
Working with XML
Read with this
Run a test executable
Run a test executable
More like this