Board logo

标题: [文本处理] 批处理中的另外一种语言 [打印本页]

作者: 帝尊    时间: 2022-11-11 13:33     标题: 批处理中的另外一种语言

  1. $ready = $false; $task = "MediaCreate"; $action = "Layout"
  2.    while (-not $ready) {
  3.      [xml]$xml = get-content "$WS\Panther\windlp.state.xml"
  4.      foreach ($t in $xml.WINDLP.TASK) { if ($t.Name -eq $task) { foreach ($a in $t.ACTION) { if ($a.ActionName -eq $action) {
  5.        $total = $a.ProgressTotal; $current = $a.ProgressCurrent
  6.        if ($null -ne $total -and 0 -ne $total -and $total -eq $current) {$ready = $true}
  7.        if ($null -ne $current -and 0 -ne $current) {$done = [Convert]::ToInt64($current, 16)} else {$done = 0}
  8.        write-host -nonew -fore Gray "`r${done}% "
  9.      }}}} ; if ($mct.HasExited) {break :mct}; sleep -m 10000
  10.    }
  11.    $action = "IsoLayout"; if ($null -ne $USB) {$action = "UsbLayout"}
  12.    write-host -fore Yellow "`r`nStarted $action"
复制代码
这个在批处理中的是powershell代码?
作者: BAT221110    时间: 2022-11-11 14:04

是的,是POWERSHELL.




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2