Task
Execute a system command and get its output into the program. The output may be stored in any kind of collection (array, list, etc.).




Related task
  Execute a system command


' FB 1.05.0 Win64
 
'capture the output of the 'dir' command and print it to a text file
 
Open "dir_output.txt" For Output As #1
Open Pipe "dir" For Input As #2
Dim li As String
 
While Not Eof(2)
  Line Input #2, li
  Print #1, li
Wend
 
Close #2
Close #1
End