I have a .bat file that:
executes WinSCP (calls a script txt) and transfers a file through SFTP. It also archives the file that was transferred.
My Problem is it works just fine when I double click the .bat file. BUT when I execute it in SQL Server agent job, it does archive the file but is not transffering the to the SFTP.
I get no error at all in the history of the job.
I feel it isnt executing the WinSCP or not opening the txt script. I checked permissions and it shows fine in all files and folders...
Checked FULL control for all users on all files and related folder. Tried checking my syntax.
"C:\Program Files\WinSCP\WinSCP.exe" /command "option confirm off"
/console /script="C:\Program Files\WinSCP\LocalToRemote.txt"