can i have Wildcard here

Results 1 to 3 of 3

Thread: can i have Wildcard here

  1. #1
    Pankaj Jain Guest

    Default can i have Wildcard here

    can i have some kind of wild card or somethin after the file name as i&#039;m not sure of the file extension. in the code below, the file can have extension "htm" or "html". so can i use some wild card for that (same problem with "jpg" and "jpeg"" also)<BR><BR><BR>Set fobj=Server.CreateObject("Scripting.FileSystemObje ct")<BR> Set tobj=fobj.OpenTextFile("C:Inetpubwwwrootprod_disc\ "&mod_no&".htm")<BR> &#039;onerror resumenext<BR> Do While Not tobj.AtEndOfStream<BR> StrLineText=tobj.ReadLine<BR> Response.write("&#060;font face=&#039;Verdana&#039; size=&#039;2&#039; color=&#039;#333333&#039;&#062;"&StrLineText&"&#06 0;/font&#062;")<BR> Loop<BR><BR><BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default No <eop>


  3. #3
    Join Date
    Dec 1969

    Default You could use

    If fobj.FileExist("C:Inetpubwwwrootprod_disc\"&mod_no &".htm") then<BR>Set tobj=fobj.OpenTextFile("C:Inetpubwwwrootprod_disc\ "&mod_no&".htm")<BR>ElseIf fobj.FileExist("C:Inetpubwwwrootprod_disc\"&mod_no &".htm") then<BR>Set tobj=fobj.OpenTextFile("C:Inetpubwwwrootprod_disc\ "&mod_no&".html")<BR>End If<BR><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