Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question Rename file

More
30 Sep 2015 17:53 - 30 Sep 2015 17:53 #1 by Virginie_Samson
Virginie_Samson created the topic: Rename file
Hi
I tried to use an action file "Move File" to rename a file.
We configured it like that :
- File to File : D:\FILE_STAMBIA\DPARQ\IN\EncoursPeri_PRO
- File From Dir : D:\FILE_STAMBIA\DPARQ\IN\
- File Includes : EncoursPeri_PRO*

When it is excuted, we have this error : ENC_PROC_Test Rename fichier/Renommer fichier
java.lang.NullPointerException

We tried it with only a move from this dir D:\FILE_STAMBIA\DPARQ\IN to this one D:\FILE_STAMBIA\DPARQ\ARCH; and it works.

What am i supposed to use to rename a file with a variable part.

Thanks
Last Edit: 30 Sep 2015 17:53 by Virginie_Samson.
More
02 Oct 2015 10:46 #2 by Thomas BLETON
Thomas BLETON replied the topic: Rename file
Hi,
Maybe there is something inconsistent with the combination of the properties. I'm going to check with R&D team because the message is not quite clear :).

Can you please provide an example of what you want to do ? What file(s) do you have and how you want to rename them ?
More
02 Oct 2015 12:15 #3 by Virginie_Samson
Virginie_Samson replied the topic: Rename file
We received a file named DocumentA_20151002.txt
And we want to manipulate it with a generic name in a mapping : DocumentA.txt
More
02 Oct 2015 16:40 #4 by Thomas BLETON
Thomas BLETON replied the topic: Rename file
Note that you might lose files if you have several files matching the mask DocumentA*.
But if you are sure there is only one file, here is a way to implement this with FileMove :
- File To Dir: d:/temp
- File From Dir: d:/temp
- File Includes: DocumentA*
- File Target Mapper: DocumentA*=DocumentA.txt
- File Target Mapper Type: regexp

An alternative is to set the Physical Name of the file with a Variable or a Parameter. See this article for more : www.stambia.org/doc/77-metadata/195-fill...a-fields-dynamically