web stats
Reading Folder name - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2018, 10:18 AM
rperezalejo rperezalejo is offline
What's HL7?
 
Join Date: Dec 2018
Posts: 1
rperezalejo is on a distinguished road
Default Reading Folder name

I am new on Mirth and havenīt found the answer to this question in previous post in this forum.

I have an scenario where folders exist with and ID as part of its name and inside a set of messages.
I need to read this folder ID to be able to send the value to a destination alone with the containing messages inside the folder.

In MirthConnect 3.6.1, there is only a FileReader connection type, it has a "Include All Subdirectories" but seems to be not recommended.

Any help, guide or example will be appreciated.
Reply With Quote
  #2  
Old 12-08-2018, 03:01 PM
obsessio obsessio is offline
OBX.3 Kenobi
 
Join Date: Mar 2015
Location: Turkey
Posts: 145
obsessio is on a distinguished road
Default

PHP Code:
idFromMessage "3289732";

Directory java.io.File("C:/1101/MIRTH/MSG");
Folder java.io.File(Directory "/" idFromMessage);

logger.info(org.apache.commons.io.FileUtils.directoryContains(DirectoryFolder)); 
Reply With Quote
  #3  
Old 12-10-2018, 05:08 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 561
agermano is on a distinguished road
Default

Include all subdirectories is appropriate to use in some situations, or it would not be an option Sounds like it might work for you. What do you need to do with the original files after you send them?
Reply With Quote
Reply

Tags
file reader, folder

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:20 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Mirth Corporation