[thelist] ASP FSO problem.

cd-ml at aardvark.net.au cd-ml at aardvark.net.au
Mon Dec 20 00:19:18 CST 2004


> Correct me if I'm wrong... but IWAM_machine name starts up dllhost.exe
>
> And all .asp, com and other ISAPI extensions are run under dllhost
>
> (ASP is considered an ISAPI extension)
>
> So, perhaps it is the IWAM_machine user that is being locked out?
>
>
> Keep that in mind when you're poking around with effective permissions

I will have a play around with the IWAM account later, just not at my
computer at the moment.

> You also may want to simplify your code just to be sure it isn't some typo
> that none of us is noticing...

The code I gave in my first e-mail can't be simplified any further :) I
know it works because when I put in say M:\Dir it will list the
subfolders' size's.  The error occurs only when I try and get the size of
a subfolder.

> I had something the other day that was driving me nuts... and just when I
> was sure my machine was haunted... I went back to a kind of "hello world"
> script and found that I'd done something stupid...
>
> So run this with and without a folder specified in the drive, 'cause I
> know
> it works fine.
>
> <table border="1">
> <tr>
>   <td>Path</td>
>   <td>Name</td>
>   <td>Size</td>
>   <td>DateCreated</td>
>   <td>DateLastAccessed</td>
>   <td>DateLastModified</td>
> </tr>
>
> <%
> Set FSObj=Server.CreateObject("Scripting.FileSystemObject")
> Set FolderObj = FSObj.GetFolder ("M:\")
>
> For Each Item in FolderObj.Files %>
>   <tr>
>     <td><%= Item.Path %></td>
>     <td><%= Item.Name %></td>
>     <td><%= Item.Size %></td>
>     <td><%= Item.DateCreated %></td>
>     <td><%= Item.DateLastAccessed %></td>
>     <td><%= Item.DateLastModified %></td>
>   </tr>
> <% Next %>
>
> </table>
>
> <% Response.Write("Total = " & FolderObj.Files.Count)%>

I will try out that script when I get a chance. I might point out that I'm
trying to get the subfolders collection, not the files, but it's as simple
as changing "FolderObj.Files" to "FolderObj.Subfolders". I will try it out
but I'm pretty sure it will error on the item.size line.

> rose

Thanks Rose!

> -----------------
> c:/dos
> c:/dos/run
> run/dos/run
>>>
> -----------------

I love that sig :)

Cya,

Craig



More information about the thelist mailing list