The %shell() function executes the MS-DOS command, command, and returns the exit code of the command.
code = %shell (command)
The %shell() function executes an executable file, not the command built-ins.
To list a directory (DIR), type the following, or something similar:
%shell("cmd /c dir")