Thursday, 4 January 2018

Read file from FTP location using Powershell


To read the file from the FTP, we can use below script:

$webclient = New-Object System.Net.WebClient
$webclient.Credentials = New-Object System.Net.NetworkCredential('ftp username','ftp password')

$uri = New-Object System.Uri('ftp path')

$webClient.DownloadFile($uri, 'local path') 

No comments:

Post a Comment

Migration issues for SAP.Connector.dll from Win 2003 to Win 2019 server

Recently I got task of migration of asmx web services from windows 2003 to windows 2019 server. These web services fetch data from SAP us...