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.

Options
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)

Options

Topic review

martin

Ok, so you want WinSCP to skip subfolders that contain no .csv files, right? WinSCP cannot do this.
thardon

Thanks for your help! :)

Unfortunately it doesn't work for me. :( Now, It's copying no files at all.
The csv-Files are stored in sub-folders. Maybe that's why this one copies no files. WINSCP has to search recursively through all sub-folders. And it seems you have to use * as remote path..
locksonline

I think I managed to get this working with the following line:

get -filemask="yourString"* *.txt

HTH
thardon

Folders are copied when using filemask

I tried the same as 'locksonline'. Ok, I've changed txt to csv and I'm downloading to Windows temp file but I think that's not the problem.

GET -filemask="*.csv" * D:\temp\


Result of this codeline is that winscp copies many, many empty folders from remote to local. Am I doing anything wrong?

WINSCP is version 5.1.3
locksonline

Re: Filemask switch when using GET

martin wrote:

You want to do either:
get -filemask="*.txt" *
(copies all *.txt files recursively)
get *.txt
(copies all *.txt file non-recursively)


Many thanks for your reply, I have it working now.
martin

Re: Filemask switch when using GET

You want to do either:
get -filemask="*.txt" *
(copies all *.txt files recursively)
get *.txt
(copies all *.txt file non-recursively)
locksonline

Filemask switch when using GET

OK, I have done a fair amount of searching and I am still stumped with time ticking on.

I have a windows .bat file which then runs a winscp.txt file with commands via the console.

The winscp.txt file runs a number of commands successfully and the command

get *.txt


works just fine.

However, the following does not:

get -filemask="*.txt"


I thought it maybe an issue with the quotes, so have tried with or without quotes and or double quotes, etc.

The error being returned in the windows command prompt when running the .bat file is,

Missing parameter for command 'get'


Any help or guidance greatly appreciated.

PS. WinSCP is version 5.1.2