Comments and answers for "Is it possible to run a command line command in FME?" https://knowledge.亚搏在线safe.com/questions/72280/is-it-possible-to-run-a-command-line-command-in-fm.html The latest comments and answers for the question "Is it possible to run a command line command in FME?" Comment by robertdbuckley on robertdbuckley's comment https://knowledge.safe.com/comments/72402/view.html That worked super!thanks

Thu, 14 Jun 2018 09:33:07 GMT robertdbuckley
Comment by takashi on takashi's answer https://knowledge.safe.com/comments/72292/view.html The TempPathnameCreator creates a temporary file path and save it into a feature attribute called "_pathname" by default, so you can construct the command line using the attribute value and set it to the SystemCaller.e.g.
"blablabla > "@Value(_pathname)""
You can then set "_pathname" to the "Source Filename" parameter in the subsequent AttributeFileReader to read the file.
If the file wasn't created anyway, set the "Exit Code Attribute" parameter in the SystemCaller to check if the exit code indicates 'success'.
Note: The temporary file will be removed automatically when the translation has completed.If you need to keep the file, specify an appropriate file path instead of the temporary file path.

Wed, 13 Jun 2018 09:47:14 GMT takashi
Answer by robertdbuckley https://knowledge.safe.com/answers/72287/view.html

thanks for the advice.I am having trouble creating the temporary file to store the results of the commandline command.I have created a TempPathCreator and see that the attribute has been filled with a path.How do I read the temporary file with the AttributeFileReader?I have set the Source Filename to the attribute Temppath from the TempPathCreator and changed the encoding to DOS Latin.-1 but nothing is read.

Wed, 13 Jun 2018 08:03:39 GMT robertdbuckley
Comment by takashi on takashi's answer https://knowledge.safe.com/comments/72283/view.html Agree.The SystemCaller can be used here effectively.
Just be aware that the SystemCaller itself won't read the file created by the command.If you intend to use contents of the text file written by the command in the subsequent processes in the workspace, you will have to write the result into a temporary file then read back it with another transformer, such as the AttributeFileReader or the FeatureReader.
The TempPathnameCreator is convenient to create a temporary file path.

Wed, 13 Jun 2018 07:17:06 GMT takashi
Answer by redgeographics https://knowledge.safe.com/answers/72282/view.html

Yes, the SystemCaller will do that

Wed, 13 Jun 2018 07:04:29 GMT redgeographics