I need to read external files within an ARIS script. The only ways to this I know are:
- Read file form LOCATION_COMMON_FILES (batch mode)
- Read file from a generic folder (generic path of my computer), using Dalogs.Browseforfiles (interactive mode).
Well, but I need to read file that could be in a generic folder in batch mode and i didn't be able to do it, I don't know even if it is possible. Does anyone know it?
Maggiù Pennarola
Hi.
One day I published code how to read text files and think this will lead to discussion.
But it looks like forum moderators like to talk to themselves and this thread was immediatelly closed for unknown reason. Looks like there is no much desire to spread information how to use ARIS scripts.
Just a reminder, how you can read files:
var BATC_HFILE = "c:\\temp\\aris_test1.bat"
Dialogs.MsgBox("Test for the external program execution.\nRunning batch file:\n" + BATC_HFILE, Constants.MSGBOX_BTN_OK, "ARIS V7 TEST");
var process = Context.execute(BATC_HFILE);
var inReader = new java.io.BufferedReader(new java.io.InputStreamReader(process.getInputStream()));
var sResult = "";
var text;
while((text = inReader.readLine()) != null)
{
sResult += text + "\n";
}
process.waitFor(); //ends when process terminates
Dialogs.MsgBox("Test for the external program execution\n" + sResult, Constants.MSGBOX_BTN_OK, "ARIS V7 TEST");
Hello,
I realize this thread is old, but how can I use this to read a file from a network share like \\server\file.xls ?
Thank you,
Allen