我是一名初学者,正在尝试使用PowerShell定位一个类似于get-childitem的命令,以便在FTP站点上使用。
以下是一些伪代码:
$target = "c:\file.txt"
$username = "username"
$password = "password"
$ftp = "ftp://$username:$password@myftpsite"
$webclient = New-Object System.Net.WebClient
$uri = New-Object System.Uri($ftp)
#below is the code that does not work, get-childitem needs a local path
$name = get-childitem -path $ftp
get-childitem只能用于本地路径。请问有谁知道当在ftp站点时如何以此方式访问文件名?
谢谢