Executing a DOS command and saving the output

Executes the DOS 'dir' command on the C: drive and puts output into text file for further processing

This example executes the DOS 'dir' command on the C: drive and puts output into a text file for further processing. It is based on the blog "Executing Command-line Applications Using The Run Action". The C:\ drive in this example could be substituted with any mapped drive or folder. The 'dir' command has many options to obtain a variety of directory/file information. Any DOS command can be substituted for the 'dir' command in this example to capture the output of the command in a file.

Task Category:

Functions (Basic)