web stats
Move-to File Name syntax - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2011, 12:36 PM
jimbox13 jimbox13 is offline
Mirth Newb
 
Join Date: Sep 2011
Posts: 19
jimbox13 is on a distinguished road
Question Move-to File Name syntax

I am using a File Reader and would like to rename the file with a timestamp to prevent it from being processed again (it won't meet the Filename Filter Pattern anymore). Windows XP OS.

What is the syntax used in the "Move-to File Name:" parameter?

I've experimented with several things but it just keeps reading the same file over and over again.

The last thing I tried was: "${ORIGINALNAME}{date.get('yyyyMMdd')}ERROR.OL D" but It does not work.

Thanks so much!

Reply With Quote
  #2  
Old 10-03-2011, 02:35 PM
mourisj mourisj is offline
Mirth Guru
 
Join Date: Feb 2007
Location: Luxembourg
Posts: 407
mourisj is an unknown quantity at this point
Default

${ORIGINALNAME}${date.get('yyyyMMdd')}ERROR.OLD
should work
__________________
JJ Mouris
FFE Luxembourg
IT-Department
Reply With Quote
  #3  
Old 10-03-2011, 02:41 PM
jimbox13 jimbox13 is offline
Mirth Newb
 
Join Date: Sep 2011
Posts: 19
jimbox13 is on a distinguished road
Default

Thanks for the response!

However this also had no effect. What about Move-to Directory? I heard you have to put something there, like ".". But when I put "." there it puts it into the "C:\Program Files\Mirth Connect" folder with the changed name. I'd rather not have the files go there. Maybe "." is linux specific? not windows?

Does the "error" directory also need something specified for this all to work?

Thanks again!
Reply With Quote
  #4  
Old 10-03-2011, 03:42 PM
mourisj mourisj is offline
Mirth Guru
 
Join Date: Feb 2007
Location: Luxembourg
Posts: 407
mourisj is an unknown quantity at this point
Default

You can use variable names iny any of move-to directory, Move-to filename and error directory name.

Use full pathes (Drives, mapped shares or UNC-pathes work fine); '.' refers to current directory, that's why you find your file in your installation directory.

Missing directories are created, if privileges are OK.

Check privileges of your Mirth service user, or use a user for Mirth service with sufficient privileges

We use all this to create daily archive folders of our messages, never had problems to get it working.
(Did you notice the $ missing in your filename?)
__________________
JJ Mouris
FFE Luxembourg
IT-Department
Reply With Quote
  #5  
Old 10-03-2011, 05:50 PM
jimbox13 jimbox13 is offline
Mirth Newb
 
Join Date: Sep 2011
Posts: 19
jimbox13 is on a distinguished road
Default

Thanks for the help.

So if "." gives the current running/install directory... how do you specify the directory where the source file came from? Do you have to hard code it?
Reply With Quote
  #6  
Old 10-03-2011, 11:42 PM
mdehoog mdehoog is offline
Mirth Guru
 
Join Date: Mar 2011
Location: Apeldoorn the Netherlands
Posts: 301
mdehoog is on a distinguished road
Send a message via Skype™ to mdehoog
Default

Why not using the Mirth vars like:
${ORIGINALNAME}${SYSTIME}
${ORIGINALNAME}${DATE}
__________________
X Connections
https://documentor.email
https://www.x-connections.com
Reply With Quote
  #7  
Old 10-04-2011, 04:37 AM
mourisj mourisj is offline
Mirth Guru
 
Join Date: Feb 2007
Location: Luxembourg
Posts: 407
mourisj is an unknown quantity at this point
Default

Hello,

As far as I could test it, it is not possible to "move" the file to the same directory. I got stuck on this one, too.

If you need, you retype your input directory (or you use the same variables)
__________________
JJ Mouris
FFE Luxembourg
IT-Department
Reply With Quote
  #8  
Old 10-04-2011, 08:21 AM
jimbox13 jimbox13 is offline
Mirth Newb
 
Join Date: Sep 2011
Posts: 19
jimbox13 is on a distinguished road
Default

Hi mourisj, Yeah I guess you're right. Once I put in a hard coded directory it seems to rename it as desired.

Let me know if anyone figures out how to rename the file and keep it in the same path.

Thanks for the help everyone.
Reply With Quote
Reply

Tags
delimited, file, move, rename, syntax

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 12:40 AM.


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