Hi all
in CMD env.
when i wrote ping 8.8.8.8 > E:\out.txt
the output of this command is written to e:\out.txt
but in PB env
when i wrote
Run(" ping 8.8.8.8 > E:\out.txt")
or even
Run(" ping 8.8.8.8 > E:\out.txt", Maximized!)
there was no output file?
what is error?
Thanks
Ahmed
as
Run('cmd /c "ping 8.8.8.8 > " + ls_var + ')
/C runs a command and exits. If you use /K instead the prompt will remain open.
It is also possible to specify more then one command to run. Read the help for CMD. So you have a chance to do what you want - change directory (cd /d ...) or wait some seconds (timeout ...).
Because it is a simple string that you specify for the Run function you can use powerbuilder variables to create the string as in your example.