RosettaCodeData/Task/Execute-a-system-command/JavaScript/execute-a-system-command-2.js
Ingy döt Net 764da6cbbb CDE
2013-04-10 16:57:12 -07:00

10 lines
281 B
JavaScript

runCommand("cmd", "/c", "dir", "d:\\");
print("===");
var options = {
// can specify arguments here in the options object
args: ["/c", "dir", "d:\\"],
// capture stdout to the options.output property
output: ''
};
runCommand("cmd", options);
print(options.output);