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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:21:25+00:00 2026-06-12T03:21:25+00:00

The Windows batch file I am trying to run contains the following assignment: set

  • 0

The Windows batch file I am trying to run contains the following assignment:

set ANT_HOME="C:/Program Files/apache-ant-1.8.4"

The offending line is:

call %ANT_HOME%/bin/ant -f ../config/common.xml start_db

And when I run the script with echo on I get:

call "C:/Program_Files/apache-ant-1.8.4"/bin/ant -f ../config/common.xml start_db
Files/apache-ant-1.8.4""=="" was unexpected at this time.

I’ve moved the second quote to to the end of the path, after the ant, but I receive the same error message.

  • 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-12T03:21:27+00:00Added an answer on June 12, 2026 at 3:21 am

    If ant were an .exe I would say your code should work. But I suspect that ant is a batch file, and the error is occurring within the ant script.

    I base my conclusion on your error message – specifically the following portion of it: ""=="". The error message is a batch parsing error, and I don’t see how your code could generate those characters. So I figure ant must be a batch script that is causing the problem.

    I suspect ant.bat has @echo off at the top, so you are not seeing the actual line that is failing.

    Not having access to the ant.bat script, I couldn’t possibly diagnose exactly what is failing, nor can I guess on how to fix it.

    Update – exact problem found

    I found a copy of ant.bat online.

    It has the following line of code within:

    if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
    

    Your definition of ANT_HOME includes enclosing quotes, so the code is trying to execute

    if ""C:/Program Files/apache-ant-1.8.4""=="" set ANT_HOME=%DEFAULT_ANT_HOME%
    

    The space is not quoted, and you have your error.

    All you need to do to fix everything is to remove the quotes from the definition of ANT_HOME, and then add quotes to your CALL statement:

    set "ANT_HOME=C:/Program Files/apache-ant-1.8.4"
    call "%ANT_HOME%/bin/ant" -f ../config/common.xml start_db
    

    Forward-slashes are not always reliable as folder delimiters within Windows. See Why does the cmd.exe shell on Windows fail with paths using a forward-slash ('/'') path separator?.

    Better to use back-slashes.

    set "ANT_HOME=C:\Program Files\apache-ant-1.8.4"
    call "%ANT_HOME%\bin\ant" -f ..\config\common.xml start_db
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

trying to run a simple batch file in windows 2008 task scheduler call cleanup.bat
I am trying to do the following in a batch file on Windows 7:
I'm trying to run some console application .exe files from a batch file in
I'm trying to run this batch file from a windows service (running as my
I have been trying to find a way of getting a windows batch file
In a Windows batch file, I want to construct a classpath of .jar files
I have a Windows batch file that processes all the files in a given
When my Windows Batch file (.bat) calls other two BAT files it exits after
I would like to set the date in a Windows batch file to 7
hello I am making web page searching program with windows batch file before searching

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.