system() doesn't work

   3049   1   1
User Avatar
Member
58 posts
Joined: July 2005
Offline
i don't use unix/linux OS, i use XP instead,
hopefully i can just use the command : ‘system()’ to work with some DOS command (to act like unix command). in shell (windows/shell) if i type command like: dir, finger etc, it'll give me some output. But when in textport i type:
echo `system(“dir”)` or echo `system(“finger”)` etc. i got no output (blank), what's wrong?
the only command that give me some result is ‘help’ –> echo `system(“help”)`.
does it only work on UNIX?

clay~
User Avatar
Member
4262 posts
Joined: July 2005
Offline
Under Win2k I can do the following….

echo `system(“cmd /C dir”)`

In the command shell “cmd /h” tells me….
/C Carries out the command specified by string and then terminates

Your mileage might vary.

jim.
if(coffees<2,round(float),float)
  • Quick Links