标题: [文本处理] 批处理中的另外一种语言 [打印本页]
作者: 帝尊 时间: 2022-11-11 13:33 标题: 批处理中的另外一种语言
- $ready = $false; $task = "MediaCreate"; $action = "Layout"
- while (-not $ready) {
- [xml]$xml = get-content "$WS\Panther\windlp.state.xml"
- foreach ($t in $xml.WINDLP.TASK) { if ($t.Name -eq $task) { foreach ($a in $t.ACTION) { if ($a.ActionName -eq $action) {
- $total = $a.ProgressTotal; $current = $a.ProgressCurrent
- if ($null -ne $total -and 0 -ne $total -and $total -eq $current) {$ready = $true}
- if ($null -ne $current -and 0 -ne $current) {$done = [Convert]::ToInt64($current, 16)} else {$done = 0}
- write-host -nonew -fore Gray "`r${done}% "
- }}}} ; if ($mct.HasExited) {break :mct}; sleep -m 10000
- }
- $action = "IsoLayout"; if ($null -ne $USB) {$action = "UsbLayout"}
- write-host -fore Yellow "`r`nStarted $action"
复制代码
这个在批处理中的是powershell代码?
作者: BAT221110 时间: 2022-11-11 14:04
是的,是POWERSHELL.
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |