【发布时间】:2013-10-13 19:06:06
【问题描述】:
我怎样才能让 PowerShell 理解这种类型的东西:
Robocopy.exe | Find.exe "Started"
旧的命令处理器给出了结果,但我对如何在 PowerShell 中执行此操作感到困惑:
&robocopy | find.exe "Started" #error
&robocopy | find.exe @("Started") #error
&robocopy @("|", "find.exe","Started") #error
&robocopy | &find @("Started") #error
&(robocopy | find "Started") #error
本质上,我想将一个外部命令的输出通过管道传输到另一个外部命令。实际上,我将调用 flac.exe 并将其导入 lame.exe 以将 FLAC 转换为 MP3。
干杯
【问题讨论】:
-
如果 .exe 不是为接受管道而设计的,你就不能..
-
Find.exe 被设计为接受管道,就像 lame.exe 一样。我得到的任何错误都是来自 Powershell 不理解我的意思。您可以尝试在 cmd.exe 中查找示例
标签: powershell command pipe external