批处理文件中的问题 [英] a problem in batch file
本文介绍了批处理文件中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨。
我有这个批处理文件
SET jlinklocation = D:\Program Files \SEGGER \ JLinkARM_V482 \\ \\
cd / d%jlinklocation%
(
echo设备AT91SAM7S64
echo loadbin C:\binfile.bin 0X100000
)| jlink.exe
退出
我的问题是AT91SAM7S64之后有空格。和jlink程序想用这个 - >
AT91SAM7S64注意64后的空格字符。在.bat文件中我没有看到空格字符。我怎么解决这个?
解决方案
首先,你不能使用%jlinklocation%,它应该是%jlinklocation%,否则引用该集合符号赢了'工作。
至于AT91SAM7S64中的空格并且相关问题无论如何都没有在你的代码示例中体现出来。
echo设备AT91SAM7S64
只是在控制台中输出字符串,因此空格不会有任何区别。如果你在最后解释空白区的作用或想要的效果,我会试着回答。
-SA
Hi.
I have this batch file
SET jlinklocation = D:\Program Files\SEGGER\JLinkARM_V482\
cd /d %jlinklocation %
(
echo Device AT91SAM7S64
echo loadbin C:\binfile.bin 0X100000
)|jlink.exe
exit
My problem is taht the AT91SAM7S64 have an space after it. and jlink program want use this ->
"AT91SAM7S64 " attention to space character after "64". in .bat file I dont see the space character. How can I solve this ?
解决方案
First of all, you cannot use "%jlinklocation %", it should be "%jlinklocation%", otherwise reference to the set symbol won' work.
As to the blank space in "AT91SAM7S64 " and related problem is not manifested in your code sample anyhow.
echo Device AT91SAM7S64
simply outputs string in the console, so the blank space won't make any difference. If you explain the role of the blank space at the end or desired effect, I'll try to answer.
—SA
这篇关于批处理文件中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文