copying a list of files from one machine to another with the same path

Hello All,

I would like to download a list of files from a remote server to my local machine preserving the path i.e, create a similar directory tree.

ex:
files on the remote machine with path

/remoteserver/005_S_0221/mpr/m1/I72128/dat/06A515T.dat
/remoteserver/005_S_0221/mpr/m2/I102054/dat/515T.dat
/remoteserver/006_S_0547/mpr/m1/I75279/dat/6A515T.dat
/remoteserver/006_S_0547/mpr/m2/I78722/dat/A515T.dat
/remoteserver/007_S_1339/mpr/m1/I56319/dat/5T.dat
/remoteserver/007_S_1339/mpr/m2/I104363/dat/1515T.dat
/remoteserver/010_S_0786/mpr/m1/I65597/dat/15T.dat

after downloading the path on the local machine should look like this

/localmachine/005_S_0221/mpr/m1/I72128/dat/06A515T.dat
/localmachine/005_S_0221/mpr/m2/I102054/dat/515T.dat
/localmachine/006_S_0547/mpr/m1/I75279/dat/6A515T.dat
/localmachine/006_S_0547/mpr/m2/I78722/dat/A515T.dat
/localmachine/007_S_1339/mpr/m1/I56319/dat/5T.dat
/localmachine/007_S_1339/mpr/m2/I104363/dat/1515T.dat
/localmachine/010_S_0786/mpr/m1/I65597/dat/15T.dat

On the remote server there are many other files in the directory that i do not want so could not use rsync or scp -r

Thanks in advance

tar these files on remote server, and scp the tar file to local, then untar it.

thank your for the quick reply rdcwayx

but how do i tar only the files from the list. There are many other files and subdirectories on the remote machine

---------- Post updated at 07:47 PM ---------- Previous update was at 07:33 PM ----------

This seems to work. Thanks again

cat list.txt|xargs tar cf archive.tar

echo "/remoteserver/005_S_0221/mpr/m1/I72128/dat/06A515T.dat
/remoteserver/005_S_0221/mpr/m2/I102054/dat/515T.dat
/remoteserver/006_S_0547/mpr/m1/I75279/dat/6A515T.dat
/remoteserver/006_S_0547/mpr/m2/I78722/dat/A515T.dat
/remoteserver/007_S_1339/mpr/m1/I56319/dat/5T.dat
/remoteserver/007_S_1339/mpr/m2/I104363/dat/1515T.dat
/remoteserver/010_S_0786/mpr/m1/I65597/dat/15T.dat" |xargs tar cvf file.tar