【发布时间】:2014-08-28 12:13:19
【问题描述】:
我正在尝试使用 powershell 执行 WGET 并将输出转到文本文件。
到目前为止,所有尝试都失败了。
PS C:\Program Files (x86)\GnuWin32\bin> For ($i=1; $i -lt 5; $i++)
{wget.exe www.zillabunny.com | out-file C:\temp\wget.txt}
留下一个空的文本文件
和
For ($i=1; $i -lt 5; $i++) {wget.exe www.zillabunny.com} > C:\temp\wget.txt
给我
:术语“>”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查 名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。 在行:1 字符:60 + For ($i=1; $i -lt 5; $i++) {wget.exe www.zillabunny.com} > wget.txt + ~ + CategoryInfo : ObjectNotFound: (>:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
【问题讨论】:
标签: powershell