p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: FileSystemObject behaving erratically - "Object doesn't support this property or method"


Message #1 by "Darryl Hadfield" <webmaster@r...> on Sat, 23 Jun 2001 20:59:02
Any ideas why the following work as shown,but error out with the 
lastmodified line uncommented??  The code is a modification of 
Professional A.S.P. 3.0, page 207.

Help!

Darryl


<%

set objFSO=Server.CreateObject("Scripting.FileSystemObject")

set objDriveC=objFSO.GetDrive("C:")

set objRoot=objDriveC.RootFolder

Set objFolders=objRoot.SubFolders

For each ObjFolder In objFolders
	set objFolder1=objFolders.Item((objFolder.Name))
	Exit For
Next

For Each objFile in objFolder1.Files
	Response.Write("Name: " & objFile.Name & "  <br>")
	Response.Write("Size: " & objFile.Size & "  <br>")
	Response.Write("Type: " & objFile.Type & "  <br>")
	Response.Write("Path: " & objFile.Path & "  <br>")
'	Response.Write("LastModified: " & objFile.LastModified 
& "  <br>")
Next

%>

  Return to Index