Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


I got it now, please ignore my previous replies. I tried the 5.x beta, right clicked on the folder I wanted to copy, chose Copy, click on Transfer settings, then clicked on the Edit button in File Mask. From there I entered the files I wanted. It works great!

Re: How to use wildcards to copy specific files in nested dirs?

One other note, I tried the 5.x beta and the mask you specified but it didn't apply the file mask to the subfolders, it was only applied to the current folder.

Re: How to use wildcards to copy specific files in nested dirs?

Thanks for the tip. I'm using 4.x. I tried "*/; *.jpg; *.png" and it is copying the entire subfolders over rather than just the jpg and png files located inside those nested folders. I believe since the directory mask */ is specified, it's just copying over the whole directory over.

How do I make it so it goings through those nested directories but only copies jpg and png files only in those directories?

martin wrote:

Depends on version of WinSCP you are using.
With 4.x, you need to use: */; *.jpg; *.png
With 5.x beta, it is enough to use: *.jpg; *.png
Also with 5.x you can use file mask editor:

How to use wildcards to copy specific files in nested dirs?

Let's say I want to use the WinSCP GUI to copy only the files that end in .png or .jpg from a folder called image. So basically I want to drag over the image folder and only copy those files.

The image folders contains many folders nested deep inside it, so I want WinSCP to recursively search all those nested directories for my file types as well. I want it to copy over those .png and .jpg files and place them in the same folder structure they were found in.

How can I do this using the WinSCP GUI? Thanks!