web stats
Mirth Community - View Single Post - Unable to move a folder through file reader
View Single Post
  #5  
Old 09-28-2017, 10:22 PM
arpit arpit is offline
Mirth Newb
 
Join Date: Sep 2017
Posts: 11
arpit is on a distinguished road
Default

Quote:
Originally Posted by aTom View Post
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.

Yes Tom, you get it right. I want to copy or move folders also.
I checked 'yes' to Include Sub-directories but that also not digging into folder structure. Mirth is copying only files, that are present in source folder.
Not in the sub-folders.
Reply With Quote