The Exec component is for executing system commands. Learn how to use the Exec component.


To install camel-exec you can use the managed libraries or manually upload the library jars with their dependencies.

Route sample (Windows)

This example will print the files and directories name present in C:\ :

<routes xmlns:u="http://www.systar.com/aluminium/camel-util" xmlns="http://camel.apache.org/schema/spring">
        <from uri="timer://foo?repeatCount=1"/>
        <to uri="exec://c:/windows/system32/cmd.exe?args=/c dir /b c:\"/>
            <tokenize token="\r\n">${body}</tokenize>
            <to uri="log:testExec"/>

Related Links