Hello All,
To start off I created a PowerShell script that worked wonderful for pulling the weekly .csv file from the server and deleting it afterwards. This was done on our QA server. Here's the code:
Problem is that our PROD server uses SSH which seems not to work with this script. I have been looking everywhere for a SSH script that can be automated to log on to the server, go to the path, download the file, then delete it.
Any suggestions?
To start off I created a PowerShell script that worked wonderful for pulling the weekly .csv file from the server and deleting it afterwards. This was done on our QA server. Here's the code:
Code:
$File = "c:\wp test\$(get-date -f yyyy-MM-dd).csv"
$ftp = "ftp://<username>:<password>@<hostname>/<path>"
"ftp url: $ftp"
$webclient = New-Object System.Net.WebClient
$uri = New-Object System.Uri($ftp)
"Downloading $File..."
$webclient.DownloadFile($uri, $File)
Problem is that our PROD server uses SSH which seems not to work with this script. I have been looking everywhere for a SSH script that can be automated to log on to the server, go to the path, download the file, then delete it.
Any suggestions?