Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-1387

how to use environment variables in a windows batch command

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Incomplete
    • Icon: Trivial Trivial
    • other
    • None
    • Platform: All, OS: Windows XP

      I have a windows batch command that looks something like this

      cmd.exe /C testrunner.bat C:\SampleProject.xml -f C:\${env.BUILD_NUMBER}

      the -f arguement for testrunner creates a folder to dump the output. I want this
      folder name to be the same as the BUILD_NUMBER. However this literally creates a
      folder with the name ${env.BUILD_NUMBER}

      I have tried a bunch of combinations but cannot figure this out. Not sure if
      this is a bug or I am doing something wrong.

      Thanks

      Ali

            Unassigned Unassigned
            arazauci arazauci
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: