Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Question Rename file

More
30 Sep 2015 17:53 - 30 Sep 2015 17:53 #1 by Virginie_Samson
Rename file was created by Virginie_Samson
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
Replied by Thomas BLETON on 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
Replied by Virginie_Samson on 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
Replied by Thomas BLETON on 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