Auto login to WINSCP to download a file
Need help on this- By executing/running the bat file, it should connect to winscp and download the file to my local system. It should not ask any user Id and password
I have tried in two ways. But no luck. Please help on this.
=======
Case1
=======
By executing the below "Cmd-Txt.bat" file data is downloading but asking userid and password, even though I have mentioned those details in "original.TXT" file(There is no special characters in the password. It contains only alphabets and numeric values only).
Cmd-Txt.Bat file:
====================
cd /d C:\Program Files (x86)\WinSCP
winscp.exe /console /script=C:\Users\VJAYAKRI\Desktop\original.txt
exit
CMD
original.TXT
================
open mysite.com
USEDID
Password
lcd C:\
cd <<directery name where the file is located in mysite.com>>
get <<FileNameToFetch>>.TXT C:\<<DestinationFileName>>.txt
bye
By executing/running the Cmd-Txt.Bat file, it is prompting for use Id and password. Once i have input those details the file is downloaded the file to my local system.
==========================================================================
========
Case 2
========
By executing the below ftp-pull.bat file, it is connecting to winscp without asking the userid and password but file is not downloading.
ftp-pull.bat
============
cd /d C:\Program Files (x86)\WinSCP
winscp ftp://<<USERiD>>:<<PASSWORD>>@MYSITE.com/<<directery name where the file is located in mysite.com>> /explicitssl
get <<FileNameToFetch>>.TXT C:\<<DestinationFileName>>.txt
exit
CMD
By ecevuting the ftp-pull.bat, I am getting the below message in the command line console.
===============================================================
Connecting to MYSITE.com...
Connected with MYSITE.com,negotiatinf SSL connection...
SSL connection established. Waiting for welcome messae...
Connected
Starting the session...
Reading the session...
Session started.
Active session:[1] <<user Id>>@<<mysite>>.com
Winscp>
===============================================================
It is connecting to Winscp with out asking the user Id and password. But the get command is not exectuning it seems, So file is not downloading.
Need your help very urgently to resolve this to download the file through winscp with out giving the use id password manually.
please post on this or reach me on my mail id smeritv@gmail.com, for more details.
I have tried in two ways. But no luck. Please help on this.
=======
Case1
=======
By executing the below "Cmd-Txt.bat" file data is downloading but asking userid and password, even though I have mentioned those details in "original.TXT" file(There is no special characters in the password. It contains only alphabets and numeric values only).
Cmd-Txt.Bat file:
====================
cd /d C:\Program Files (x86)\WinSCP
winscp.exe /console /script=C:\Users\VJAYAKRI\Desktop\original.txt
exit
CMD
original.TXT
================
open mysite.com
USEDID
Password
lcd C:\
cd <<directery name where the file is located in mysite.com>>
get <<FileNameToFetch>>.TXT C:\<<DestinationFileName>>.txt
bye
By executing/running the Cmd-Txt.Bat file, it is prompting for use Id and password. Once i have input those details the file is downloaded the file to my local system.
==========================================================================
========
Case 2
========
By executing the below ftp-pull.bat file, it is connecting to winscp without asking the userid and password but file is not downloading.
ftp-pull.bat
============
cd /d C:\Program Files (x86)\WinSCP
winscp ftp://<<USERiD>>:<<PASSWORD>>@MYSITE.com/<<directery name where the file is located in mysite.com>> /explicitssl
get <<FileNameToFetch>>.TXT C:\<<DestinationFileName>>.txt
exit
CMD
By ecevuting the ftp-pull.bat, I am getting the below message in the command line console.
===============================================================
Connecting to MYSITE.com...
Connected with MYSITE.com,negotiatinf SSL connection...
SSL connection established. Waiting for welcome messae...
Connected
Starting the session...
Reading the session...
Session started.
Active session:[1] <<user Id>>@<<mysite>>.com
Winscp>
===============================================================
It is connecting to Winscp with out asking the user Id and password. But the get command is not exectuning it seems, So file is not downloading.
Need your help very urgently to resolve this to download the file through winscp with out giving the use id password manually.
please post on this or reach me on my mail id smeritv@gmail.com, for more details.