ForEach ($file in gci F:\power\videos){
$file$ftp=”ftp://user:pass@domain.com/pub/$File”
$webclient = New-Object System.Net.WebClient
$uri = New-Object System.Uri($ftp)
$webclient.UploadFile($uri, $file)Move-Item $file.Fullname F:\power\copia
$file.FullName | Out-File F:\power\copiados.txt -Append
}
The post Upload files to FTP automatically and save a copy appeared first on Scripting and Security.