Re: Contents of a Directory

From: Steven Livolsi (steven.livolsi_at_ngc.com)
Date: 12/02/04


Date: Thu, 2 Dec 2004 15:56:51 -0500

Thanks.

I think I see what you mean. However, I don't understand when you say "wrap
it in a custom Active X and sign it". Could you please explain?

Also, the code listed below I thought could be run in java script. (Client
and Server)

      Scripting Runtime Library

Folders Collection
Collection of all Folder objects contained within a Folder object.

Remarks
The following example illustrates how to get a Folders collection and how to
iterate the collection:

[JScript]
function ShowFolderList(folderspec)
{
   var fso, f, fc, s;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   f = fso.GetFolder(folderspec);
   fc = new Enumerator(f.SubFolders);
   s = "";
   for (; !fc.atEnd(); fc.moveNext())
   {
      s += fc.item();
      s += "<br>";
   }
   return(s);
}
Thanks."Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
news:O9LWNYK2EHA.3640@tk2msftngp13.phx.gbl...
> "Steven Livolsi" <steven.livolsi@ngc.com> wrote in message
> news:O6HEqJJ2EHA.204@TK2MSFTNGP10.phx.gbl...
> > Thanks.
> >
> > I tried using the File System Objects in my java scipt but it looks
like
> > the java script code bombed.
> >
> > It bombed on the statement:
> >
> > fso = new ActiveXObject("Scripting.FileSystemObject");
> >
> > If I comment out the above statement, my java script function does not
> bomb.
> >
> > Is there a setting or something I need to do with my windows 2003 IIS
> sever?
> > Is there an include file I need?
> >
> > My java script is:
> >
> > <script language=javascript>
> >
> > function select_change()
> > {
> > .
> > .
> > .
> > var fso;
> > fso = new ActiveXObject("Scripting.FileSystemObject");
> > .
> > .
> > .
> > }
> >
> > </script>
> >
>
> You're trying to run this client-side? You can't use the FileSystemObject
> in client-side browser code as that would be a security breach. You would
> have to wrap it in a custom ActiveX and sign it.
>
>


Loading