找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 15389|回复: 1

[文本处理] 批处理中的另外一种语言

[复制链接]
发表于 2022-11-11 13:33:35 | 显示全部楼层 |阅读模式
  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代码?
发表于 2022-11-11 14:04:21 | 显示全部楼层
是的,是POWERSHELL.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-19 11:36 , Processed in 0.016899 second(s), 8 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表