Command Line Tool

This command will run a command line when a detected file is matched. Token can be used to refer to the details of the detected file and are replaced at detection time.

When to use it

When there is no existing command and the program you want to execute has a command line interface use this to execute it.

Configuration

commandLineSetting

  • string name - the unique name of the configuration element.
  • string outPutPath - the path where processed file will be saved to.
  • string workingPath - the path where files will be saved to, while being processed.
  • string errorProcessingPath - the path where files that could not be processed will be moved to.
  • string fileNameFormat - the file name format that is applied on outputted files.

  • string commandPath - the command path to use. e.g. c:\bin\test.exe.
  • bool checkCommandPathExists - should the command path should be checked for its existance.
  • string args - the command line arguments to use. Tokens will be replaced in argument string.

  • These tokens will be replaced with their settings value.

{%InputFilePath%} The name of detected file.
{%OutPutFilePath%} The path where processed files should be saved to.
{%Name%} The name of the configuration element.
{%OutPutPath%} Output path.
{%WorkingPath%} The path where files will be saved to, while being processed.
{%ErrorProcessingPath%} The path where files that could not be processed will be moved to
{%FileNameFormat%} The file name format that is applied on outputted files.
{%CommandPath%} Command path to use. e.g. c:\bin\test.exe

Example Configuration


<configuration>
  <commander>
    <projects>
      <project name="Blog">
        <commandLineSettings>
          <!-- Blog - Original Image Output -->
          <commandLineSetting name="SettingsForBlogOriginal" outPutPath="C:\Data\talifun-commander\Examples\Assets\Blog\Output\Photo\Image\Original\" commandPath="CMD.exe" checkCommandPathExists="false" args="/c copy &quot;{%InputFilePath%}&quot; &quot;{%OutPutFilePath%}&quot;"/>
        </commandLineSettings>
      </project>
    </projects>
  </commander>
</configuration>