Problem with FileSystemObject

Results 1 to 2 of 2

Thread: Problem with FileSystemObject

  1. #1
    Kentium Guest

    Default Problem with FileSystemObject;s the deal:<BR><BR>I&#039;m writing my little Document Download Center app, and i&#039;ve got the pure ASP file upload working from this article-<BR><BR><BR><BR>The problem i&#039;m having is that I&#039;d like to use the File objectin FSO to get some additional info- Size, DateCreated, DateLastModified, etc. When I can access these bits of info, i&#039;ll store them in a variable and later write them to a database table.<BR><BR>The problem i&#039;m having is that when I put in my code-<BR><BR>Set oFS = Server.CreateObject("Scripting.FileSystemObject")< BR>strFileName = File.FileName<BR>Set objFile = oFS.GetFile(strFileName) <BR>iFileSize = objFile.Size <BR>Response.Write "the file size is " & iFileSize<BR><BR>I get an Object Required on the strFileName = File.FileName line.<BR><BR>Any ideas? Thanks!

  2. #2
    Kentium Guest

    Default RE: Problem with FileSystemObject

    For anyone who cares-<BR><BR>strFileName only held the file name, and not the path + filename which apparently oFS.GetFile(strFileName) needs in order to work properly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts