Hi all, i need a script that scan a local directory and put each element in array… this elements are jars my real problem is that i need to make a call like “java -cp “C:...file1.jar;C:...file2.jar;…” but the jars are too many so i need to add a javascript that scan all my directory and make a cal like java -cp on all the directory’s elements
for those who ask… i have tried something like java -cp “C:...*.jar” but it didn’t worked.
@TrigauthorJul 09.2007 — #My questione was: "i need a script that scan a local directory and put each element in array" i'm working on a text document so need a javascriptlike and so this is the right forum Ultimater
@UltimaterJul 09.2007 — #JavaScript is powerless in this area. JScript (IE's JavaScript) however lets you use ActiveX. <i> </i><script type="text/javascript"> fn=function(){ alert("Your browser does not support JScript.nTry using Internet Explorer.") } </script> <script type="text/jscript"> fn=function(o){
fso=new ActiveXObject("Scripting.FileSystemObject"); f = fso.GetFolder(document.getElementById("f2s").value); var s=""; for (var fc = new Enumerator(f.files); !fc.atEnd(); fc.moveNext()){
if(o==1 && !/jar/i.test(fso.GetExtensionName(fc.item())))continue s += fc.item()+"n" } alert(s)