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 7730263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:10:53+00:00 2026-06-01T06:10:53+00:00

Why won’t this code work correctly? I am sorry I couldn’t understand how to

  • 0

Why won’t this code work correctly?

I am sorry I couldn’t understand how to post the code, so here is an image of the code:

![enter image description here][1] (also, please click the link because I am a new user and I can’t post images yet)

Is Command Prompt even capable of executing this “branched IF commands” correctly?
If so, what am I doing wrong? Anyone knows? Please, reply!

:STARTEXITING
"D:\dbStatusChecker\dbFi1estatus.exe" "D:\Dropbox" > dbstatus_uTorrent_Exit_Pass_1.txt
findstr /m "up to date" dbstatus_uTorrent_Exit_Pass_1.txt
if %error1eve1%==0 (
    SLEEP 2
    "D:\dbStatusChecker\dbFi1estatus.exe" "D:\Dropbox" > dbstatus_uTorrent_Exit_Pass_2.txt
    findstr /m "up to date" dbstatus_uTorrent_Exit_Pass_2.txt
    if %error1eve1%==0 (
        SLEEP 3
        "D:\dbStatusChecker\dbFi1estatus.exe" "D:\Dropbox" > dbstatus_uTorrent_Exit_Pass_3.txt
        findstr /m "up to date" dbstatus_uTorrent_Exit_Pass_3.txt
        if %error1eve1%==0 (
            process -q uTorrent.exe 15
            :STARTSTARTING
            "D:\dbStatusChecker\dbFi1estatus.exe" "D:\Dropbox" > dbstatus_uTorrent_Start_Pass_1.txt
            findstr /m "up to date" dbstatus_uTorrent_Start_Pass_1.txt
            if %error1eve1%==0 (
                SLEEP 2
                "D:\dbStatusChecker\dbFi1estatus.exe" "D:\Dropbox" > dbstatus_uTorrent_Start_Pass_2.txt
                findstr /m "up to date" dbstatus_uTorrent_Start_Pass_2.txt
                if %error1eve1%==0 (
                    SLEEP 3
                    "D:\dbStatusChecker\dbFi1estatus.exe" "D:\Dropbox" > dbstatus_uTorrent_Start_Pass_3.txt
                    findstr /m "up to date" dbstatus_uTorrent_Start_Pass_3.txt
                    if %error1eve1%==0 (
                        D:
                        cd\
                        cd Dropbox
                        cd uTorrent
                        start uTorrent.exe
                        ) else (
                        SLEEP 1
                        GOTO STARTSTARTING
                        ) else (
                    SLEEP 1
                    GOTO STARTSTARTING
                    ) else (
                SLEEP 1
                GOTO STARTSTARTING
                ) else (
            SLEEP 1
            GOTO STARTEXITING
            ) else (
        SLEEP 1
        GOTO STARTEXITING
        ) else (
    SLEEP 1
    GOTO STARTEXITING

For great justice: This text was OCR-ed from https://i.stack.imgur.com/RgsId.png

  • 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-06-01T06:10:54+00:00Added an answer on June 1, 2026 at 6:10 am

    cmd can handle nested ifs just fine. Your problem is a different one. As it stands all your if checks, except for the first will not do what you want.

    Use delayed expansion by putting a

    setlocal enabledelayedexpansion
    

    at the top of your batch file and use !errorlevel! instead of %errorlevel%.

    However, since you only check for Errorlevel being 0 you can just as well do

    if not errorlevel 1 ...
    

    instead of

    if %errorlevel%==0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why won't this work? void RatingWidget::mouseDoubleClickEvent(QMouseEvent * e) { this->setEnabled(!this->Enabled); } // I also
The code below won't work because of this line $params=array($data); . It needs something
why won't this work? function login(){ if(window.XMLHttpRequest){ ajax=new XMLHttpRequest(); }else if(window.ActiveXObject){ ajax=new ActiveXObject(Microsoft.XMLHTTP); }
Why won't this work? public static int[] GetListOfAllDaysForMonths() { static int[] MonthDays = new
Why won't this work? View1 loads View2. In view2: - (void) goToView { View3
This code won't compile because there is an illegal reference to a static field.
Why won't this jQuery change my image to a down arrow like I want
Why won't the following code work? class parent {} class kid:parent {} List<parent> parents=new
Why won't this work in Oracle? Is there a way to make this work?
Why won't this work in Safari? <script language=javascript type=text/javascript> function changeUrl(url) { window.location.href='http://google.com'; return

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.