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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:42:02+00:00 2026-05-18T10:42:02+00:00

I am trying to set up a TeamCity build process that runs a custom

  • 0

I am trying to set up a TeamCity build process that runs a custom command line script. The script uses a variable so it needs a percent sign (e.g. %x). But TeamCity uses percent signs for its properties (e.g. %build.number%), so the percent sign in the script gets removed when it runs.

If the script contains this:

for /d %x in ("c:\*") do @echo "%x"

This is what it actually runs:

for /d x in ("\*") do @echo "x"

How can I write my script so it can include variables?

  • 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-18T10:42:02+00:00Added an answer on May 18, 2026 at 10:42 am

    Try for /d %%x in ("c:\*") do @echo "%%x" (i.e. duplicate the % signs).

    But there should be a way to tell TC to leave the file alone. It would be horrible if TC would remove the percent signs in the sources. Therefore, I’m pretty sure that you did something in the configuration to enable replacement of %.

    On a similar note, is it really TC that messes with the script? Or are you using a build tool to generate the script or something like that?

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

Sidebar

Related Questions

I am trying to set up a Teamcity build configuration that runs from our
I am trying to get a build process set up in TeamCity 5, and
Im trying to set the certificate friendly name during the certificate request/acceptance process. I
Trying to set up a gridview with a custom adapter, I get my cursor
Trying to set up a script to send commands to a remote client on
Alright, I've trying to set up a TeamCity server the past few hours, but
Trying to set up the svn commit with trac using this script. It is
Im trying to set up a variable and pass it constructor function essentailly like
Im trying to set the name of a radio button that I generated from
trying to set up a config file for a custom module - do I

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.