help with system commands
| tweak | |||
| hello all, i was hopeing i could get some help with running a windows system command and getting the output of that command returned into a string.
string szMyString = runCommand("dir");or something like that i no you can use
System("dir");to get the directory output but all it does is output to the console, is there anyway to output to a string? | |||
| firedraco | |||
| I am pretty sure you can put the data it gives you into a file, and then get the data from the file, but I don't think you can just pipe it into a string. | |||
| SteakRider | |||
| @tweak there is nothing imposible in programming;) ahead, save the result of dir command to a file, and you can read the file as how as you want
system("dir >a.txt"); | |||
| DiptenduDas | |||
| @tweak U can use _popen for the same.
| |||
Registered users can reply in this forum.
