How about an input field for Run Dos Command

Say, you could specify a variable containing input, or a variable containing the name of an input file, and that input would be sent to the program. Since output can already be captured, this would be pretty powerful: you could use external DOS/mks42 utilities like Sort or whatever without having to write data to a file first.

Steve

Hi Steve,

Unfortunately, the main problem with this kind of feature is implementing it. Sending data to the standard input of a process and making it work reliably is actually fairly hard. There used to be experimental support for it in FB but we pulled it after too many programs gave unusual results.

If you use the Run DOS Command action instead of the Execute Program action, you can use “< FileName.txt” to redirect input from a file.

Regards,

Angus

Ok, if you say so. Maybe FB could simply write the contents of the variable to disk, then perform the input redirection you mention.

(Note that I was specifically talking about Run DOS Command, rather than Execute Program…)

Steve

Hi Steve,

Good suggestion on automatically piping input to DOS commands. Can you explain exactly what commands you need to pipe information to?

Regards,

Angus

Ok, a simple case is sort - there’s no “sort” action. But given a sort.exe which reads/writes from/to standard input/out (of which there are many), you could simply have a “Run DOS command” action where the input is %Listtobesorted% and the output is %SortedList% (Ideally you could make them the same variable, but I can see how that would be problematic).

Awk is another common one: we use awk scripts here relatively often, so it’s handy to be able to quickly pipe some text through an awk script.

Steve