CAMEL SFTP Producer - Change /home/username/ dir to <root> / root dir

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CAMEL SFTP Producer - Change /home/username/ dir to <root> / root dir

sukul26
I am using the following in my camel config:
 
<camel:route id="ABC_ROUTE">

        <camel:from uri="file:{{camel.route.abc.from.file.path}}?filter=#fileFilterABC&amp;initialDelay={{camel.route.from.file.initialDelay}}&amp;delay={{camel.route.from.file.delay}}&amp;useFixedDelay=true&amp;runLoggingLevel=TRACE&amp;startingDirectoryMustExist={{camel.route.from.file.startingDirectoryMustExist}}&amp;autoCreate={{camel.route.from.file.autoCreate}}&amp;maxMessagesPerPoll={{camel.route.from.file.maxMessagesPerPoll}}&amp;eagerMaxMessagesPerPoll=true&amp;delete=false&amp;readLock=idempotent&amp;readLockLoggingLevel=OFF&amp;readLockRemoveOnRollback=false&amp;readLockRemoveOnCommit=false&amp;idempotent=true&amp;idempotentKey=${file:onlyname}&amp;idempotentRepository=#iclMessageIdRepository&amp;recursive=false&amp;move={{camel.route.abc.complete.file.path}}&amp;moveFailed={{camel.route.abc.failed.file.path}}" />

        <camel:to uri="sftp://user1@ecom199.host.com:22/nas/tst2/inputfiles?password=Pass1234&amp;runLoggingLevel=TRACE"/>

    </camel:route>

Now, this is working. It is able to sftp my file.

Problem is I want my file to be at: /nas/tst2/inputfiles . But it is going at: /home/user1/nas/tst2/inputfiles

Now, how can I make it for going it at /nas/tst2/inputfiles ?? /nas/ and /home/ both are on /

The problem is changing this default /home/.

Which attribute I can use, I am not able to find or understand how to do it in camel DSL. Please help!
Reply | Threaded
Open this post in threaded view
|

Re: CAMEL SFTP Producer - Change /home/username/ dir to <root> / root dir

sukul26
I went through http://camel.465427.n5.nabble.com/Apache-Camel-ftp-component-need-to-use-absolute-path-td5796693.html
And related info.

What I want is, if there is any way to reach to root dir and then get to another directory?

Or something by symlinks is possible ?
Reply | Threaded
Open this post in threaded view
|

Re: CAMEL SFTP Producer - Change /home/username/ dir to <root> / root dir

sukul26
Ok So this is resolved by:

adding "/../.." in the directory path and using stepwise=true.