Dir \ B> log.txt failure in batch processing (the pre-symbol of the parameter must be/: Dir/B> log.txt)

Source: Internet
Author: User
Cause:

Batch Processing is used for batch directory processing. one of the following statements is:

Dir \ B> log.txt

There is no problem in using "cmd", but in batch processing, the following message is always prompted:

"File not found" or "the specified path is invalid" or

"The volume in drive Z is Data
The serial number of the volume is the CC21-7E88"

And so on.

Remove the file name and change it to Dir \ B.

But you can remove the parameter and change it to dir> log.txt.

In addition, the \ B parameter cannot be used before or after interchange with the output file segment.

Solution:

Prefix symbols of parameters are always inaccurate. Here "\" is used, and "-" cannot be replaced. After "/" is used, you can.

Conclusion:

CMD adds the redundancy function. It supports the "\", "-", and "/" symbols as parameter prefixes, but it is not so lucky in batch processing. Haha!

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.