[英]Not printing anything after for loop in a batch script
Below is my batch script which is not executing the line after for loop end. 下面是我的批处理脚本,它在for循环结束后未执行该行。 It's not print echo end or the line after that.
它不是打印回显结束或之后的行。 The line
asciidoctor-pdf C:\\Users\\abc\\Conversion_to_PDF\\OutputFiles\\*.adoc
is causing it. 造成此
asciidoctor-pdf C:\\Users\\abc\\Conversion_to_PDF\\OutputFiles\\*.adoc
。 But I am not sure with what the problem is. 但是我不确定是什么问题。
@echo off
echo # Starting job
java -jar C:\Users\abc\Conversion_to_PDF\swagger2markup-cli-1.3.1.jar convert -i C:\Users\abc\Conversion_to_PDF\HIP-ProviderManagement-1.0.0-swagger.json -d C:\Users\abc\Conversion_to_PDF\OutputFiles
chdir /d C:\Users\abc\Conversion_to_PDF\OutputFiles
for %%A in (*.adoc) do (
asciidoctor-pdf C:\Users\abc\Conversion_to_PDF\OutputFiles\*.adoc
echo %%A
)
echo # end
C:\Users\abc\Downloads\sejda-console-3.2.3\bin\sejda-console merge -f C:\Users\abc\Conversion_to_PDF\OutputFiles\*.pdf -o C:\Users\abc\Conversion_to_PDF\OutputFiles\merged.pdf
You need 你需要
call asciidoctor-pdf ....
since asciidoctor-pdf
is a batch file. 因为
asciidoctor-pdf
是批处理文件。 The call
means "execute this, then return to the next statement". 该
call
意思是“执行此操作,然后返回到下一条语句”。 Without the call, it means "go to this batchfile" and it is not told to return to the original (the "caller") 如果没有电话,它的意思是“去这个批处理文件”并没有被告知返回到原来的(以下简称“主叫方”)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.