Yes, I already have an IPCHECK.PRG UDF that uses the "!PING 192.168.1.10 > result.txt" type of DOS redirect command (under Foxbase) to create output to a text file. I was hoping for a more independent .BIN implementation that would not require that data files be employed and would run under Foxbase. Unfortunately, in Foxbase, filetostr() is not an available function so a DBF must be opened and appended to (with type sdf) to capture the text file's contents. Then these contents (now in the DBF) can be explored. Again, I was trying to find a more independent approach that uses the LOAD and CALL commands in Foxbase 2.1 (since that is the language I'm stuck with in this case). Maybe there is no such animal...?
Thanks for the thought,
Bob
Bob,
In VPF I'd do the following;
lcIP = [the DNS entry or IP address - e.g. 'www . yahoo . com'] (minus spaces *g*)
lcCmd [run ping ] + lcIP + [ > results.txt]
&lcCmd
Then (again in VFP) lcVar = FILETOSTR('results.txt') and you will have some information you can parse.
Remember, DOS has the ability to pipe the output of a command.
You just need to adapt the above to the more limited Foxbase command set.
Best,
DD
I know this is off-topic but I still need to use Foxbase sometimes and thought someone using this forum might have a suggestion for me. I'm looking for a binary code file to LOAD and CALL (from within Foxbase 2.1) that will allow me to get a result similar to the DOS PING command. Was hoping there might be some sort of download library I might be able to tap. Thanks.