reading folder on a mapped network drive - not work
Posted: Tue Oct 10, 2017 9:00 pm
Hi,
I'm trying to read a folder on a mapped network drive, but is doesn’t work.
The strange things is that the script work when i test it with a fixture pane in SwitchScripter, and give me the results.
When i run the script whitin a flow i got an error. (Error in line 56 of script : Error. Trying to access undefined member '3')
Any suggestion?
Here my code
function GetMyFolderList(mydir){
var MyDir = new Dir(mydir);
var FolderList = MyDir.entryList("*");
return FolderList;
}
function jobArrived( s : Switch, job : Job )
{
// work on test, not work in a flow
var lista = GetMyFolderList("X:\\");
s.log(1,lista[3]); // Error in line 56 of script : Error. Trying to access undefined member '3'
// work on test, work in a flow
var lista = GetMyFolderList("C:\\");
s.log(1,lista[3]);
}
I'm trying to read a folder on a mapped network drive, but is doesn’t work.
The strange things is that the script work when i test it with a fixture pane in SwitchScripter, and give me the results.
When i run the script whitin a flow i got an error. (Error in line 56 of script : Error. Trying to access undefined member '3')
Any suggestion?
Here my code
function GetMyFolderList(mydir){
var MyDir = new Dir(mydir);
var FolderList = MyDir.entryList("*");
return FolderList;
}
function jobArrived( s : Switch, job : Job )
{
// work on test, not work in a flow
var lista = GetMyFolderList("X:\\");
s.log(1,lista[3]); // Error in line 56 of script : Error. Trying to access undefined member '3'
// work on test, work in a flow
var lista = GetMyFolderList("C:\\");
s.log(1,lista[3]);
}