帮忙把iscsicli 断开批处理转成AU3
@echo offecho **********正在断开连接**********
for /l %%a in (1,1,10) do (
iscsicli sessionlist>session.isc
for /f "tokens=1,3,4" %%b in (session.isc) do (
if %%b==Session (
iscsicli logouttarget 0x%%d>session.isc
)
if %%b==Total (
if %%c==0 (
echo **********断开连接成功**********
goto end
)
)
)
) 没看明白是什么意思
你直接说下思路再写了 帮顶了,学习一下 _RunDos('@echo off')
_RunDos('echo **********正在断开连接**********')
_RunDos('for /l %a in (1,1,10) do (')
_RunDos('iscsicli sessionlist>session.isc')
_RunDos('for /f "tokens=1,3,4" %b in (session.isc) do (')
_RunDos('if %b==Session (')
_RunDos(' iscsicli logouttarget 0x%d>session.isc')
_RunDos(')')
_RunDos('if %b==Total (')
_RunDos(' if %c==0 (')
_RunDos(' echo **********断开连接成功**********')
_RunDos(' goto end')
_RunDos(' )')
_RunDos(')')
_RunDos(')')
_RunDos(')')
页:
[1]