How to copy only selected file types in WinSCP?

6,302

Solution 1

(a simple app specific question like this belongs on the app's support forum, or perhaps SuperUser but not ServerFault, but as I know and I'm taking a work break I'll answer anyway)

You would have to use the Select Files command from the Mark menu (usually bound to the key numpad:+) and type your match pattern (i.e. *.php;*.js) into there. You can then operate on the selected files as usual.

Solution 2

The answer by @David Spillett is correct for files in the current directory.

If you want to do this recursively, use a transfer file mask.

The mask would be the same as David suggested, i.e. *.php;*.js.

For more details, check file mask syntax.

Share:
6,302

Related videos on Youtube

Simon Perepelitsa
Author by

Simon Perepelitsa

Updated on September 17, 2022

Comments

  • Simon Perepelitsa
    Simon Perepelitsa over 1 year

    I want to download only php, html, css, xml and js files from FTP server. How to do this with WinSCP (4.2.4)?

    • Hastur
      Hastur about 7 years
      In general, for this goal, it can be useful wget too. (Note it exists a version for windows too). Read the options to include only specified file pattern (*.css...)
  • Simon Perepelitsa
    Simon Perepelitsa over 14 years
    How to select files in subfolders too? "Including directories" option doesn't work.
  • David Spillett
    David Spillett over 14 years
    That is probably not possible. You would need a client that you could script. Or perhaps use another protocol if possible (for instance using rsync over the SSH connection if permitted by your server config - a combination of its --recursive option and --include/--exclude options woudl do what you are looking for).