Can you help me with this?

Results 1 to 2 of 2

Thread: Can you help me with this?

  1. #1
    Join Date
    Dec 1969

    Default Can you help me with this?

    I got this code out of an asp book. But I don&#039t want the dir it shows to be the same one as this file is in. I want to be able to change the dir it shows.<BR>Please help...<BR><BR>&#060;%<BR><BR>Dim strPathInfo, strPhysicalPath<BR>strPathInfo = Request.ServerVariables("PATH_INFO")<BR>strPhysica lPath = Server.MapPath(strPathInfo)<BR><BR><BR>Dim objFSO, objFile, objFileItem, objFolder, objFolderContents<BR>Set objFSO = CreateObject("Scripting.FileSystemObject")<BR><BR> Set objFile = objFSO.GetFile(strPhysicalPath)<BR><BR>Set objFolder = objFile.ParentFolder<BR><BR>Set objFolderContents = objFolder.Files<BR><BR>For Each objFileItem in objFolderContents<BR>Response.Write objFileItem.Name<BR>Next<BR>%&#062;

  2. #2
    Hema S Guest

    Default RE: Can you help me with this?

    You should define the path or the directory whose listing you want, in &#039Server.MapPath&#039..<BR>Hth, Hema<BR>

Posting Permissions

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