12-06-2013 01:05 PM
I am using the following code to login to winscp ftp server and download one csv file into my network drive.
So, I am not sure where i am doing mistake.
If anybody knows, please suggest.
then I am submitting the following 2 lines of SAS Code.
%let dest = \\folder1\users\files\indata
%sysexec "C:\WinSCP\WinSCP.exe" /console /script:"&dest\FTP.txt" /command "get file1.prn &dest\file1.prn" "close" "exit";
FTP.txt file has the following code.
option batch on
option confirm off
But when i run the above code i am not getting the file into my local drive.
Any help will be appreciated.
12-06-2013 03:15 PM
You don't give us much to go on (like, how doesn't it work?) Steps to troubleshoot this:
12-06-2013 04:39 PM
Thanks Snoopy for your reply.
I just realized that i do not have winscp installed in my system. So, I think i can't download the file from the ftp server. I think this could be the blocker.
The other thing is like you said i am trying to login to the sftp server from CMD in the following way.
it prompted me to enter the password and i entered the password
But it says Permission denied<publickey, keyboard-interactive> along with a popup mesaage which says "SSH error occured, please contact administrator".
Snoopy, since you checked my code in %sysexec, do you think the sytax is correct. The purpose is i am trying to download a file from the ftp server into my dest path.
is the get command correct? if yest then i will try to install winscp and then i will try to run it and see how it goes.
The other important thing is the username and password that i am using are not mine, my team member provided his details for me to complete this task. I don't know how this affects.
In my code, in the ftp.txt, do i have to add the port(22) also to the server at the end.?
If you provide some clarification on my questions, it would really make me understand the whole process.