我怎樣才能獲得PowerShell來理解這種類型的事情: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中的查找示例 – Jobbo