09-25-2013 09:49 PM - edited 03-14-2019 12:29 PM
Does anyone know how to list the files in the customer_folder directory? I'm talking about this one:
System.getProperty("uccx.customer.dir") . I'm having problems casting a variable or object use the java.io.File listFiles method.
09-26-2013 05:31 AM
file uccx list custom_file * detai
Please remember to rate helpful responses and identify helpful or correct answers.
09-26-2013 08:51 AM
Ah, yes, I meant how do I list them from the script. I've got premium licensing so java steps are an option. The code below fails on the second java.io.File step where listOfFiles returns an array of file names, but I get an "invalid identifier" on that step when I click the apply button.
{
java.io.File folder = new java.io.File("opt/cisco/uccx/Customer/"); java.io.File[] listOfFiles = folder.listFiles(); for (int i = 0; i < listOfFiles.length; i++) { if (listOfFiles[i].isFile()) { files[i] = listOfFiles[i].getName();
}
}
return files;
}
(the script above probably has other issues but I haven't got there yet )
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide