Two little gotchas and tips pertaining to that you should be aware of:

  • There is no way to tell where to execute your command. If you need to be in a specific folder when the command is executed, you should execute a batch file or script, and have it change to the desired folder and then execute the command.
  • The tag captures output (which can be returned, or saved to a variable or file). But only stdout output is captured, not stderr, and so if the command you are executing generates error messages to stderr you’ll not see those in the captured output. The solution is to redirect stderr to stdout, if you are using Windows you can do this by adding the following to the end of the command to be executed: 2>&1

5 thoughts

  1. I’ve always found that CFEXECUTE not to be as useful as CFX_CONSOLECOMMAND which I have modified to allow the choise of 2>&1 as an output as that can be very useful.

  2. One more: It’s in the documentation, but this threw me for a loop. The CFExecute Tag is Async by default. This is nice for spawning lots of processes when you need a silent job done, but can be a pain if you end up running processes that need to be run one instance at a time.

  3. Another issue I’ve noticed is make sure which "user" you are running as. I was setting up GnuPGP on a Windows system and it took some debugging time to figure out where the keychain was stored…

Leave a Reply