Searching Problem with FSO

Results 1 to 2 of 2

Thread: Searching Problem with FSO

  1. #1
    Join Date
    Dec 1969

    Default Searching Problem with FSO

    I have a problem <BR>i am using fso object for my site searching there is some problem regarding path <BR>i try but unable to slove it. I applying searching only on specific folder <BR>follwing is the senario <BR>my domain in <BR>at server there is root folder htdoc <BR>The folder that FSO searching is subfoolder in htdocs is ppepca <BR>i am using following path <BR>section = Server.MapPath("../ppepca/") <BR><BR>following is chunk of code that i am using <BR> For Each objFile in objFolder.Files <BR> &#039;Do we need to search this file? <BR> If UCase(Right(objFile.Name,4)) = ".HTM" Or UCase(Right(objFile.Name,5)) = ".HTML" then <BR>If bolLFFound then <BR>if objFile.Size &#062; 0 then <BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject") <BR>Set objTextStream = objFSO.OpenTextFile(objFile.Path,1) <BR>strContents = objTextStream.ReadAll <BR>objTextStream.Close <BR>Set objFSO = Nothing <BR>if bolAnd then bolValid = True else bolValid = False <BR>For iLoop = 0 to iUBound <BR>If InStr(1,strContents,aLookFor(iLoop),1) then <BR>if Not bolAnd then bolValid = True <BR>Else <BR>If bolAnd then bolValid = False <BR>End If <BR>Next <BR><BR>final code is <BR>If bolValid then <BR>count_sm = count_sm + 1 <BR>strTitle = GetFileMetaTag("&#060;title&#062;", "&#060;/title&#062;", strContents) <BR>strDesc = GetFileMetaTag("&#060;meta name=""description"" content=""", """&#062;", strContents) <BR>filepath = FormatURL(objFile.Path) <BR>Response.Write " &#060;A HREF=""" & filepath & """&#062;&#060;FONT color=#0000CC SIZE=2&#062;"&filePath&"&#060;/FONT&#062;&#060;/A&#062; <BR>" & vbCrLf <BR>Response.Write "&#060;FONT SIZE=2 face=Arial, Helvetica, sans-serif&#062;" & strTitle <BR>Response.Write " <BR>" & strDesc <BR>Response.Write "&#060;/FONT&#062;&#060;P&#062;" & vbCrLf <BR>iCount = iCount + 1 <BR>End if <BR>Above code is searhing fine but in hyperlink part creating worng link <BR>i.e. creating link <BR>where correct one path is <BR> <BR>Including ppepca foider name. How i can remove this <BR>Please someone help me

  2. #2
    Join Date
    Dec 1969

    Default no need to repost.

    someone will get to you.

Posting Permissions

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