Posts

Showing posts from August, 2017

Automation WinSCP | How to Read/Write files from/to SFTP location

Create a text file which contains the step for connecting to SFTP open sftp://username:password@ServerName/ -hostkey="ssh-rsa 2048 b2:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" # Change the remote directory cd serverPath # Upload the file to current working directory get -filemask="*>=1H"  DestinationLocation # Disconnect close # Exit WinSCP exit Save this Code as File1.txt and place this in the folder where WINSCP.EXE is present. OPEN : Open Connection Username: your Username for SFTP server Password: Password for SFTP server ServerName : Server IP or Server Host name hostkey: Its a key required to make connection to that server: How to get HostKey : Run the Code Without entering the hostkey value/Tag Command line will itself show you the hostkey. serverPath: Example:  cd /opt/app/ : Go to Required Path DestinationLocation : Destination where you need to download the files get -filemask="*>=1H"  C:\TEMP\ : Get the files fro...

How to Navigate to Network path using CMD

Image
To navigate to the network path using cmd. please use the below command : pushd