Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6042429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:47:22+00:00 2026-05-23T06:47:22+00:00

I try porting linux setup script to windows. In script I have file download

  • 0

I try porting linux setup script to windows. In script I have file download like

ASL_DISTRO_SITE=surfnet.dl.sourceforge.net
BOOST_NAME=boost_1_44_0
BOOST_VERSION=1.44.0
    if [ ! -e $BOOST_DISTRO_NAME ]; then
        echo_run ${CURL_CMD} http://$ASL_DISTRO_SITE/project/boost/boost/$BOOST_VERSION/$BOOST_DISTRO_NAME -o $BOOST_DISTRO_NAME
    fi

How to port such part of script to windows .bat language? Are there any utils coming from MS by default?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:47:23+00:00Added an answer on May 23, 2026 at 6:47 am

    There seem to be a couple of missing items in the code you provide, but here is a best guess of how to proceed:

    set ASL_DISTRO_SITE=surfnet.dl.sourceforge.net
    set BOOST_NAME=boost_1_44_0
    set BOOST_VERSION=1.44.0
    set BOOST_DISTRO_NAME = xxxx?
    set CURL_CMD="c:\program files\curl\curl.exe" ???
    
    cd %BOOST_BASE_DIR%  
    
    if NOT EXISTS %BOOST_DISTRO_NAME% (
        %CURL_CMD% ^
           http://$ASL_DISTRO_SITE/project/boost/boost/%BOOST_VERSION%/%BOOST_DISTRO_NAME% ^
           -o %BOOST_DISTRO_NAME%
    )
    

    I don’t have an easy way to test this, so if it doesn’t work, remove the open and close parens and the continuation char ‘^’, and put all of the %CURL_CMD% ... command on the same line as the if NOT EXISTS ....

    So, you need to provide values for BOOST_BASE_DIR (which I have added as a var to the script), BOOST_DISTRO_NAME, CURL_CMD …. AND … you need to find out if you need echo_run, I don’t think so. For echo_run, you have to look at your original script. I would guess that this is a function defined, and that is uses the eval. If that is true, the above may not work. Make a bat file without the IF NOT test, but with the all the set ... variables, and the %CURL_CMD%, run it and then add the output of the failure to you question above 😉

    I hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small project I want to try porting to Python 3 -
I have been porting my C# / .NET 2.0 project over to Mono for
I am porting an application that I developed in Linux to Windows and am
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
Try as I might, I can't get a JNLP file to run locally (via
try: spam.foo except AttributeError: do_somthing() (Is it wise to check an attribute like that
When you try to build git v1.7.0.6 on Red Hat Enterprise Linux 3, you
After porting a code segment from Windows to Mac OS X, I found it
I'm tasked with porting a few apps from a Windows environment to various mobile
I have a console app that I'm porting to WPF. The application has 3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.