I have a file which is flatfile I want to move to a specific folder. Please help me in achieving this. I tried the below expression targetPath="#['C:\workspace\file\src\main\resources\move' ++ (as DateTime as String {format: 'yyyyMMddHHmmss'})]"
If you are using the SFTP connector Move operation:
<sftp:move config-ref="file" sourcePath="#[vars.source]" targetPath="C:\workspace\file\src\main\resources\move" createParentDirectories="true" renameTo="#['myfile ' ++ (now() as String {format: 'yyyy-MM-dd\'T\'HH:mm:ssX' }++ ".dat")]"/>
The <file:move>
operation uses the same attributes.
Warning: using colons (:
) in file names is not valid in Windows filesystems.