Use folder path as a command line parameter

Hi, I'm new to opus and I don't really know how to do something like this.

I would like to select a folder and when I click on an icon the path to the folder is applied as a parameter of a command line.

A simple example:

I select the folder c:\software, click on an icon and run the dir command in that folder

dir c:\software

Thanks

Quick demo:

image

FFI:

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Codes_for_passing_filenames.htm
https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Codes_for_passing_paths.htm

Thanks @lxp