Hello, You can use the File Expression Language [1] to obtain the name of the file and set the appropriate S3 header
For example, if you wanted just the name of the file, you can do the following from("file:///home/ram/sample/") .setHeader(S3Constants.KEY, simple(“file:onlyname.noext")) .to("aws-s3://camel-qq?accessKey=&secretKey="); - Andy [1] - http://camel.apache.org/file-language.html -- Andrew Block On June 9, 2015 at 12:14:26 AM, ram kumar (ramkumarro...@gmail.com) wrote: Hi, This will write the file present in directory sample to checkoutputdir1 from("file:///home/ram/sample/") .to("file:///home/ram/checkoutputdir1/"); My use case is to push to s3 from("file:///home/ram/sample/") .setHeader(S3Constants.KEY, simple("check5")) .to("aws-s3://camel-qq?accessKey=&secretKey="); But when i do this, it gets overwritten in 'check5'. Is there a way to get the exact file name in s3 as present in /home/ram/sample/ Thanks