script to add schedual content download automatically

Posted on 2005-05-05
Last Modified: 2010-04-17
dear sir
i want to make a script which take from a text file an address
and add it to a schedual content download to isa server
any language can do that ?
Question by:xodos
    LVL 25

    Expert Comment

    > and add it to a schedual content download to isa server.
    Excuse my ignorance, but how is this done? Do you know? (..because I don't).

    As for the rest of it, a simple Batch script can do this:

    @echo off
    title URL Schedular

    set inputFile=filename.txt

    for /f "delims=" %%U in ("%inputFile%") do call :process "%%U"
    goto :eof

    set line=%~1
    :: Schedule the download of the '%line%' variable here.
    exit /b


    HTH :-)

    Author Comment

    it will open isa server and add a schedual content download for each line it takes from the text file ,
    the script must take a line from the text file and add it as a schedual content download .
    look what i want to do :
    i have a dns cache only server and isa server on the same computer
    in dns server there are many site addresses ,
    i want to take the address from the dns and add it to the schedual content download in isa server to be downloaded daily at 1:00 am ,
    i can do it manually but there are millions of sites
    so a script is very usable here
    hope you can help me
    thank you very much

    LVL 1

    Accepted Solution

    --------------------------------snip for

    ## Create a user agent object
    use LWP::UserAgent;
    $ua = LWP::UserAgent->new;
    $ua->agent("MyApp/0.1 ");
    $ua->proxy('http', "");

    #Opens the urlfile.txt to get the URLS.
    open(HND, "./urlfile.txt") || die " Can't open file : $!";
    chomp(@arr = <HND>);

    # print all the URLS content.
    my $url;
    for$url ( @arr) {
            print "Getting $url =======================================\n";
            print "====================================================\n";
            my $res = $ua->post($url);

            if( $res->is_success ) {
                    print $res->content;
            } else {
                    print "Unable to get $url\n";

            print "\n";

    example urlfile.txt for above contains:
    ----------------------------------snip for urlfile.txt-------------------
    ----------------------------------snip ----------------------------------
    LVL 1

    Expert Comment

    you can comment
    $ua->proxy('http', "");

    if you dont' have any proxy in between like:
    #   $ua->proxy('http', "");

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    This article will show, step by step, how to integrate R code into a R Sweave document
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    754 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

    24 Experts available now in Live!

    Get 1:1 Help Now