Groups | Blog | Home
all groups > inetserver asp components > november 2003 >

inetserver asp components : some advice on dsofile.dll please...


s_m_b
11/25/2003 3:48:24 AM
having got it to read the first file in the collection, even though the
page count comes back wrong, I get
'asp 0177:80030002 server.createobject failed'
when trying to read the second file.

this is the code:

set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.getfolder("e:\ia_docs\live\0")
set fc = f.subfolders
for each fld in fc
%>folder:<%=fld.name%><%
set fl = fld.files
for each fln in fl
strfilename = fln.name

set readfile = server.createobject("dsolefile.propertyreader")
set fileprops = readfile.GetDocumentProperties("e:\ia_docs\live
\"&strfilename)
intpages = fileprops.PageCount
intwords = fileprops.wordCount
%>
<P>file = <%=strfilename%> pages=<%=intpages%> words <%
=intwords%></P>
<% set readfile = nothing
next
next
'

s_m_b
11/25/2003 9:33:05 AM
"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in
news:bpvprh$ej88@kcweb01.netnews.att.com:
makes it happier.
thanks

[quoted text, click to view]
Tom Kaminski [MVP]
11/25/2003 9:47:45 AM
[quoted text, click to view]

My own code is pretty much the same except I use a "set fileprops = nothing"
before the "set readfile = nothing" line.

--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/


AddThis Social Bookmark Button