Unable to copy file from FTP
Hello,
I've been trying to figure out for a while why an existing .bat script (using WinSCP) started failing when attempting to copy a file from an FTP site. It is called in a SQL Agent job (that has been running fine for months) and the error in the log is "No file matching .bak found". There is a single *.bak file in this location and I can access it via the WinSCP GUI. Here is the code:
cd C:\Program Files (x86)\WinSCP
WinSCP.com /console /command "option batch on" "option confirm off" "open SiteName" "get *.bak" "exit"
I've tried (unsuccessfully) searching online for ways to debug this, as well as where the SiteName info is stored to verify that it's correct, because I can't see it in the GUI. Also, tried replacing the SiteName with the URL generated from the GUI when I log in manually ( ftp://UserName:PW@HostName/folder/) and it doesn't work.
Any advice will be much appreciated.
Thank you,
Milliana
I've been trying to figure out for a while why an existing .bat script (using WinSCP) started failing when attempting to copy a file from an FTP site. It is called in a SQL Agent job (that has been running fine for months) and the error in the log is "No file matching .bak found". There is a single *.bak file in this location and I can access it via the WinSCP GUI. Here is the code:
cd C:\Program Files (x86)\WinSCP
WinSCP.com /console /command "option batch on" "option confirm off" "open SiteName" "get *.bak" "exit"
I've tried (unsuccessfully) searching online for ways to debug this, as well as where the SiteName info is stored to verify that it's correct, because I can't see it in the GUI. Also, tried replacing the SiteName with the URL generated from the GUI when I log in manually ( ftp://UserName:PW@HostName/folder/) and it doesn't work.
Any advice will be much appreciated.
Thank you,
Milliana