SSH alone does not transfer files but it allows transferring a stream of data and running commands on the remote computer.
This means that you can use any utility which will transform your files into a stream of data pass the stream through SSH and on the other end do the reverse process - extract the files from the stream. Below is an example with tar
.
find /source/path -iname "*.ext" -print0 |
tar --null -cf- -T- |
ssh user@machine "tar -xf- -C /path/to/extract"
The command sequence can be on single line I added newlines for better readability. Probably only GNU tar has the --null
and -T
options.
If you do not have the suitable tools on your Windows you can install for example Cygwin.
@BrunoHeblingVieira 'file type' is ok. Maybe that commenter questioned what you meant because in your title you had written "from a given type" whereas 'of' would be the right term rather than from, Also though, file extension is technically better, if that's what you are specifying, and it is possible that a file's type isn't determined by its extension. The find command(the *nix one you can use via cygwin) might be able tp be amended to specify file type rather than extension i.e. regardless of extension. That would probably suit your purposes too – barlop – 2015-05-16T12:23:09.647
2What do you mean by file of the same type? – heavyd – 2013-10-02T15:40:50.260
1Thanks for editing the question, it seems file 'type' makes way more sense in portuguese than in english. – Firebug – 2013-10-02T16:52:57.410