2016-12-16 115 views
-4

簡單的問題,我如何使用powershell腳本連接到FTP?我可以使用帶命令提示符容易連接到FTP的東西,如:Powershell使用腳本連接到FTP

ftp "ip address" 
"some username" 
"some Password" 

但是當我嘗試使用上面的代碼連接到FTP在腳本中我無法連接,我看到的是提示,詢問用戶名。在腳本中提供FTP「ip地址」後,是否需要使用某種方法才能進行連接?

+6

http://stackoverflow.com/questions/19059394/powershell-connect-to-ftp-server-and-get-files – 4c74356b41

回答

0

我找到了需要使用ftp -s的答案:「filewithcommands」可能應該多說明我想要的內容。下面是裏面是什麼「filewithcommands」

open 
IP address 
user 
pass 
cd "targetdir" 
get "file" 
quit 
+0

此無關使用PowerShell 。 –