Why won the spawn Proc statement work under MS-Windows?
Under most other Operating Systems, the spawn Proc statement works as expected with the operating system command. Under UNIX, for example, spawn “ls -l” produces a directory listing. However, spawn “dir” will not work under MS-Windows. This is because some MS-DOS commands are internal to the command interpreter (also known as COMMAND.COM). To use MS-DOS commands, you need to use the spawn Proc statement with COMMAND.COM. For example: spawn “COMMAND.COM /c DIR” The ‘/C’ switch specifies that a parameter is being passed to COMMAND.COM which it must execute. The parameter in the above example is DIR.