Re: Help with MS Access to PowerShell FTP download
Please post the WinSCP log.
Function FTP2()
runSendreports = Shell("Powershell.exe -executionpolicy bypass C:\Program Files\Tasks\FTP.ps1")
End Function
& "C:\Program Files (x86)\WinSCP\WinSCP.com" `
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul `
/command `
"open sftp://root:root@192.16x.x.xx/ -hostkey=`"`"ssh-ed519 255 TS/UKKyryg2jo0WN`"`" -rawsettings FSProtocol=2" `
"cd /usr/share/astguiclient/Scripts" `
"lcd C:\Shared\BPFilesIn" `
"get tbl_export.xlsx" `
"exit"
$winscpResult = $LastExitCode
if ($winscpResult -eq 0)
{
Write-Host "Success"
}
else
{
Write-Host "Error"
}
exit $winscpResult