You'd need to use either a plug in, if one exists that offers this capability, or use FileMaker to run a system script such as a batch file of the needed command lines. But this is system specific. Are you using a mac or windows system to do this?
As per post - Windows 8.1, local area network
A simple ping.bat file can be run, which would have the ping variable passed to it so might read as "ping 192.168.1.34"
1. how to run a bat file from within windows.
2. how to pass the variable to the file ( as the IP address is different for each client)
3. how to capture results (so it can be analysed)
Any good reference books that people can recommend ?
Simply opening a BAT file runs it.
A method that I have used is to set up a table of text fields where each record is one command line. To use a specific IP address then is simply a matter of adding that text to a text field in this table. (I usually have one field for the command, one for the parameters and export only a calculation field that combines the two into the needed command line.)
You then use export records to export this to a text field, specifying a file name that includes the .BAT file extension. There's an option you can use to have this file be automatically opened when it is exported so you can export the records to a text file in the temporary folder and it will be opened and run automatically.
- I don't know if this is possible with the Ping command line, but most such command lines can have their output redirected to a text file. FileMaker can thus export the records to create and run the batch file, pause for a few seconds to allow the Ping command to generate the needed text file and then this text can be imported back into FileMaker in order to display (and keep if you need this) the results.
- Simply opening a BAT file runs it.
Thank you for the feedback PhilModJunk - fully understand and know I can do create table with fields for command(s) and parameters etc, but cant find anything in online help nor this forum on the get to bat file to run from the command line. Could you clarify that bit please.
You don't need to run the BAT file from the command line. You run it from FileMaker. That's the point in having FileMaker automatically open the file immediately after using export records to create the BAT file in the first place.
I appreciate that you are a much more seasoned Filemaker developer than I will ever be PHilModJunk, but when you talk about opeing a file with Filemaker, the little documentation there is within FIlemaker and other books I have looked at, saysOpening filesYou can open FileMaker Pro files located on your computer. You can open single files or multiple files at the same time.
So okay, you can open Filemaker files, as one would hope, but then there is nothing further about how to open "other types of files"
I have looked at the DDE Execute statement, but that can execute programs like linking to a URL and oening the web page, but does not allow you to control the results.
So, can I impose on you further and ask psecifically how you recommend opening the bat file to execute it from within Filemaker and analyse the results
If you take a look at the export files script step, you'll find that there is a check box that you can select that automatically opens the exported file. If this is a file with the .BAT extension in a Windows system, this will cause the windows OS to run the BAT file of command line instructions just as though you had double clicked the file.
Thanks to PhilModJunk - I'll look at that. Thanks for the pointer.
DavidAnders - link is very useful. Long, interesting read, which I now need to paly with. MooPLug sounds interesting ( and it is still FREE )- albeit I appreciate the warnings given about using 3rd party plugins, but it is an option to get things up and running and then replace with native code.
I will comeback once I have my solution running to let others know.