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!