【发布时间】:2015-03-14 05:30:37
【问题描述】:
我有以下脚本可以在多个 JAR 中查找一个类。类名作为字符串参数传递。
set ARG=%1
for /R %G in (*.jar) do @jar -tvf %G | find %ARG% > NUL && echo %G
给我以下错误
> findClassInJar.bat "ContentPartition"
> set ARG="ContentPartition"
| was unexpected at this time.
> for /R G | find "ContentPartition" > NUL && echo G
如何解决这个错误?
【问题讨论】:
标签: windows batch-file for-loop