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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:15:11+00:00 2026-05-26T18:15:11+00:00

I am having trouble in doing this. there is 1 batch file with this

  • 0

I am having trouble in doing this.
there is 1 batch file with this line:

set TEST_DIR=C:\temp\dir1

I just want to set some new value to TEST_DIR

But, when I use in my ant script, it escapes forward slashes and gives this result:

set TEST_DIR=C:homedir2

Instead, I want to give it:

set TEST_DIR=C:\home\dir2

I am using this command:

<replaceregexp file="${MT_BATCH_FILE_LOCATION}\myfile.bat" match="TEST_DIR=C:\\temp\\dir1" replace="TEST_DIR=C:\home\dir2" byline="true" />
  • 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-26T18:15:11+00:00Added an answer on May 26, 2026 at 6:15 pm

    I have found another simple solution use replace instead of replaceregexp.

    <replace file="${MT_BATCH_FILE_LOCATION}\myfile.bat"
                                token='TEST_DIR=C:\temp\dir1'
                        value='TEST_DIR=${new_loc}\home\dir2' />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I'm doing this a bad way... but I'm having trouble seeing any
I am doing an Financial Winforms application and am having some trouble with the
I'm doing my first C++ - Qt4 application and I'm having some trouble connecting
Ok, so I'm not having trouble with this per say, but I want to
I'm just starting with jQuery, and having trouble doing something embarrassingly simple: using .load()
I come from a C/C++ background and am having trouble doing some things in
Sorry if this is a basic question: I am having trouble doing form validation
I'm having trouble thinking this through, but basically I want to create an Elixir
I am doing this assignment and I am having trouble writing this method recursively.
I know there are similar questions out there, but I'm having trouble with this

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.