--- In [email protected], Aron <aron.gro...@...> wrote:
>
> I can run Jscript in Vistax64 with no problems. maybe you need to check 
> the code.
> 

Aron,

I have the code running in XP (32 bit), but have problems when running it in 
Vista (64 bit).

Not a JScript programmer, so not sure how else to test.  I have done the 
<Start> <Run...> regsvr32 scrrun.dll <OK> in Vista (64 bit) and it does not 
give me an error message, but perhaps there is some other way to access the 
file system object in Vista(64 bit) for the 32 bit application.   

I am posting the code again here.  Could you test it out?

ANY assistance of pointers GREATLY appreciated.

Here is the JScript code:

<%
function GetSubFolderNames(Path,Tag){
var FSO = new ActiveXObject("Scripting.FileSystemObject");
var Folder = FSO.GetFolder(Path);
var FolderEnumerator = new Enumerator(Folder.SubFolders);
var Foldernames = "";
for(; !FolderEnumerator.atEnd(); FolderEnumerator.moveNext()){
Folder = FolderEnumerator.item();
var Len = Folder.Name.length;
var tagLen = Tag.length;
if(Folder.Name.substring(Len-tagLen, Len) == Tag){
Foldernames += Folder.name.substring(0, Len-tagLen) + ",";
}
}
return Foldernames.substring(0, Foldernames.length-1);
}
%>


Essentially looking for Folders with a specific Tag string on the end of the
folder name, in a specific directory.

Here is the AFL calling code

script = GetScriptObject();
filelist = script.GetSubFolderNames("C:\\Data\\", "data");

TIA

Blair

Reply via email to