Attributes of a File

Results 1 to 2 of 2

Thread: Attributes of a File

  1. #1
    Becca Guest

    Default Attributes of a File

    Given a file name , how can i find the attributes for it<BR>Thanks for any help<BR><BR>Thanks<BR>Becca<BR>

  2. #2
    Jason Cochran Guest

    Default RE: Attributes of a File

    Try running this in the directory that you want to view the file properties of.<BR><BR>&#060;%<BR>Dim strPath, strPhysical<BR> strPath = Request.ServerVariables("PATH_INFO")<BR> <BR> strPhysical = Server.MapPath(strPath)<BR> <BR>Dim objFSO, objFile, objFileItem, objFolder, objFolderContents, vbCR<BR> Set objFSO = CreateObject("Scripting.FileSystemObject")<BR> Set objFile = objFSO.GetFile(strPhysical)<BR> Set objFolder = objFile.ParentFolder<BR> Set objFolderContents = objFolder.Files<BR> <BR> vbCR = Chr(13)<BR> <BR> For Each objFileItem in objFolderContents<BR> <BR> Response.Write objFileItem.Name & vbCR<BR> Response.Write objFileItem.Type & vbCR<BR> Response.Write objFileItem.Size & vbCR<BR> Response.Write objFileItem.DateLastModified & vbCR<BR> <BR> Next<BR>%&#062;

Posting Permissions

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