scp
can also be used to transfer multiple files from one server to another. Below is example of transferring all files from my_folder
directory with extension .txt
to server2
. In Below example all files will be transferred to user tom
home directory.
scp /my_folder/*.txt tom@server2:$HOME