powershell 中的 FTP 错误
我正在编写一个相当简单的脚本,并尝试将文件上传到 ftp 服务器。我正在使用以下命令
ftp -n -s:upload.txt 292.78.51.12 (我伪造了 IP)
它在命令提示符下完美运行,但在 powershell 中似乎有问题。 我尝试提供 upload.txt 的绝对路径,在其前面加上 .\ ,但似乎没有任何效果。
知道我做错了什么吗?
I'm writing a fairly simply script and I'm trying to upload a file to an ftp server. I'm using the following command
ftp -n -s:upload.txt 292.78.51.12 (I've faked the IP)
It works perfectly in command prompt but it seems to have a problem with it in powershell.
I've tried giving the absolute path to upload.txt, put .\ before it and nothing seems to work.
Any idea what I'm doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在“-s:upload.txt”周围加上引号。我相信这与选项中的冒号有关。如果有人能澄清为什么那就太好了。
You need to put quotes around "-s:upload.txt". I believe it has something to do with the colon in the option. If anyone could clarify why that would be great.