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 file extension

More
05 Jan 2018 14:55 #1 by Prudence
file extension was created by Prudence
Hello,
I have to manage the file extension,
how to check that the extension of a file is xml, xls or other?
how to capture the format error and send it by mail?

Thank you in advance for your assistance
More
08 Jan 2018 17:26 #2 by Thomas BLETON
Replied by Thomas BLETON on topic file extension
Hi
There are multiple ways to achieve this.
Maybe you can use a FileWait action to load the list of files in a temporary table, and then process this list with SQL ?
Or you can Bind directly the FileWait action to a FileMove action to separate files into distinct directories. And then process theses directories.
Feel free to give more details if this does not help
More
11 Jan 2018 14:58 #3 by Prudence
Replied by Prudence on topic file extension
Hi,

by the way, I would like to know how to call a variable defined in scripting and assign it to another variable of another scripting object

indeed I have a scripting object in which I defined a variable "file" which must have the name of a file, and I then have an "issuy" linked to the Scripting object in which I define a variable Y and Y must contain the value of "file".

How do I write Y = file

I tried: Y = $ {file} $, it sends me an error that it can not find the file; I think it's because Y does not recover the value

thanks for your help
More
17 Jan 2018 12:09 #4 by Thomas BLETON
Replied by Thomas BLETON on topic file extension
Scripting actions share the same variable scope, by default (except groovy if I remember well).
So, normally you can simply do:
Y = file;

I tried with Rhino scripting actions and it works well :

Example of Scripting Action 1:
file = "d:/temp/file.txt";

Example of Scripting Action 2:
Y = file;