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

More
05 Jan 2018 14:55 #1 by Prudence
Prudence created the topic: file extension
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
Thomas BLETON replied the 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
Prudence replied the 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
Thomas BLETON replied the 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;