SCP Command in UNIX | winscp file transfer | copy files in unix – If you want to transfer file from winscp, we can move those file manually by downloading to local and we can transfer those file anywhere. In Automation it’s not possible to transfer a file manually and if you do like that it’s not automation. In that case this following tutorial helps you to transfer a file from winscp to local and move winscp file from to another winscp directory.
How to Download file from winscp to local using SCP Command in UNIX
By using scp command its very easy to transfer or copy or move file from winscp (unix Location) to local Windows Machines, As well as one folder in to another folder in unix winscp.
SCP – Secure Copy Program
SCP command Syntax
scp [Optional command] [[User@]From_Host.com:]Source_File_path [User@]To_Host.com:][Destination_File_path]
SCP Command in UNIX Explanation
- User-> User Name of the server (From_Server or To_Server)
- From_Host.com-> Server address of Source file
- Source_File_path -> Full Path of the file (Eg/- /data/folder/atecguide.txt)
- To_Host.com-> Destination Path of the directory (Eg/- /data/folder)
SCP Command in Unix with Example
Copy / Move files between UNIX server samplscp.txt from atechguideserver1.com to atechguideserver2.com
scp firstname.lastname@example.org:/data/temp/samplescp.txt email@example.com:/data/dir/tech
Download or Copy Files in UNIX server using Scp command
scp user_name@servername_ipaddr:/home/user/techguide.txt /Users/atechguide/Desktop
Note: There is a space between path of directory\ source file and destination directory
Moves file samplscp.txt from Local to /data/tmp/mydir
scp samplscp.txt firstname.lastname@example.org:/data/tmp/mydir
- Download a Directory from UNIX to Windows.
- To download a full directory from winscp remote directory to local folder
scp -r Directory_name user_name@servername:/data/tmp/
Like these you can use SCP command in so many ways. Some of those things are.
- Download a file from Winscp to local.
- Import/Move a file from local to Winscp.
- Move a file from one remote directory to another directory in same server.
- Move a file from one remote directory to another directory in different server.
- Download all file from a winscp directory to local
In my next post I will share how to automate the SCP command with use of Plink and QTP.