PowerShellは少し新しいです。ftpサイトで機能するget-childitemのようなコマンドを見つけようとしています。
ここにいくつかの疑似コードがあります:
$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サイトでこの方法でファイル名にアクセスする方法を知っている人はいますか?
ありがとう