写批处理bat文件时,使用call,只能执行第一行的

鸩止 2022-06-28 16:30:44

 这个是调用的函数

:setupzip
rd /q /s %1

set curpath=%~dp0 
cd /d %curpath%
set exename=web.zip
set downurl=%2
powershell curl -o "%exename%" "%downurl%"

set "zip=..\7z\7z.exe"
for /r %%i in ("*.zip") do (
"%zip%" x %%i -y -aos -o"%1"
)
del %cd%\*.zip
for /d %%a in (*) do (
	for /f "delims=“ %%b in ('dir /b/s/a-d "%%a\"') do move "%%b" "%%a\"
	)
for /f "tokens=*" %%a in ('dir /ad /s /w /b %1') do (rd %%a)
pause
goto:eof

 

call:setupzip .\test\ https://xx/a.zip
call:setupzip .\test\ https://xxy/b.zip

结果只能执行call:setupzip .\test\ https://xx/a.zip,求各位大神帮忙看看

...全文
400 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
qishine 版主 2022-07-06
  • 打赏
  • 举报
回复

是不是第一个还没执行完?中间sleep 60试试呢?

6,868

社区成员

发帖
与我相关
我的任务
社区描述
Windows 2016/2012/2008/2003/2000/NT
社区管理员
  • Windows Server社区
  • qishine
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧