Open all links in the txt file in 1 window

Posted on 2007-10-02
Last Modified: 2012-08-14

I want a script which can open all pages in a txt file.Say i have 50 addresses web links (Http:\\sitename)
I want a way to open all these 50 links in a ie 7.0 Ie.Any way to open all at a time in a tab sheet not a new window..

Question by:bsharath
    1 Comment
    LVL 1

    Accepted Solution

    Hello Sharath,

    A VB Script could help out on that.

    Assuming your URL/Link file looks the file below, and we name it UrlList.txt:

    /* ---------------------------
    /* URL's with parameter
    /* ---------------------------

    /* --------------------
    /* Plain URL's
    /* --------------------

    the following few lines in a vbs file would open each of the links into a new tab within the same IE7 window.
    '*** Begin of StartURL.vbs
    Dim objFSO, objFile
    Dim objShell
    Dim Stream
    ' Refer to the file name with URL
    Const URLFile = "C:\UrlList.txt"

    Set objShell = CreateObject("Shell.Application")

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    If objFSO.FileExists(URLFile) Then
        Set objFile = objFSO.OpenTextFile(URLFile, 1)
        Do While Not objFile.AtEndOfStream
               Stream = Trim(objFile.ReadLine)
               If Len(Stream) > 5 AND Left(Stream,2) <> "/*" Then
                   objShell.ShellExecute Stream, "", "", "open", 1
                   'objShell.ShellExecute(0&, "open", Stream, "", "", 1)
               End If
    End If
    '*** End of StartURL.vbs

    Best Regards,
    Set objShell = Nothing

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now