web stats
Mirth Community - View Single Post - Unable to move a folder through file reader
View Single Post
  #3  
Old 09-28-2017, 10:49 AM
aTom aTom is offline
OBX.3 Kenobi
 
Join Date: Feb 2016
Location: Lake Geneva Area
Posts: 113
aTom is on a distinguished road
Default

Not sure if I understand what you want to do : you would like to pick up files from a source directory structure and copy / move them to a destination in the same folder structure, right?

It's not working that way, Reader and Writer are totally independant from each other, and they're handling files, not folders. File Reader is able to browse a directory structure to pick files according to the pattern, but not "move" folders themself. And you can use File Writer connector to create a directory structure but you have to tell him how.

There are several ways to do it, but all programmatically. For example you can determine dynamically the outgoing destination using $('originalFilename') Velocity variable, save it in a channelMap variable (say 'subDirectory') and apply it in your destination : /home/me/inner/$subDirectory.

FilenameUtils class from Apache's commons library (included in Mirth) could help you for this.
__________________
Tom
Reply With Quote