Hi friends!
How I can get the return of a line command into DOS with fivewin/xharbour like this:
"tracert -d 10.0.0.1"
Get return text of DOS command!?
Get return text of DOS command!?
Peace and lighting!
Júlio César M. Ferreira
FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Júlio César M. Ferreira
FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
- xProgrammer
- Posts: 464
- Joined: Tue May 16, 2006 7:47 am
- Location: Australia
Hi JC
You can use the RUN command
should work.
The more flexible way is as follows:
Should work fine under Windows. Certainly works under Linux. I recently wrote a "proof of concept" for compiling and linking xHarbour/FiveLinux projects via an xHarbour/FiveLinux "project manager" and the following code ran fine:
Hope that helps
xProgrammer
You can use the RUN command
Code: Select all
RUN tracert -d 10.1.1.1 >> file.txt
The more flexible way is as follows:
Code: Select all
LOCAL sOSCommand
sOSCommand := "tracert -d 10.1.1.1 >> file.txt"
RUN ( sOSCommand )
Code: Select all
FUNCTION Compile( xProject )
LOCAL sOsCommand
sOsCommand := "./m.sh " + xProject + " > " + xProject + ".flb"
RUN ( sOsCommand )
MsgInfo( MemoRead( xProject + ".flb" ) )
RETURN nil
xProgrammer