How Jenkins handles Windows batch command

Source: Internet
Author: User

These two days have been plagued by a problem.

In Jenkins, Windows Batch command tested well, got the bat file, and then called the bat from Execute Windows Batch command, unexpectedly error.

Why is it?

Let's introduce the logic of the scene and the code. Test the Good code:

CD%rootpath%
. \tools\bin\python26\python.
" Test "

In fact, Autobuild_path is a path, with "\" as the delimiter, exactly, in Python, is a raw path string. SendMail will go to this path under walk, or Listdir, find the file and read the post-processing email to [email protected]

Error message:

On the Internet, see the explanation for this much-out * * *:

Http://bbs.chinaunix.net/thread-3577853-1-1.html This article introduced a good, read the next probably understand the problem.

However, how to solve my problem, and my question is the key, and how to produce it?

I tried if os.listdir if the incoming parameter is the "\" of the raw string, it succeeds, and I find this, trying to convert the path to a raw string. Results the test cannot pass.

http://code.activestate.com/recipes/65211-convert-a-string-into-a-raw-string/

It seems that Jenkins is the ghost of the affair.

How Jenkins handles Windows batch command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.