Post a reply

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

jonleung

Re: Using filemask with exclude and timestamp

This works - thank you so much, Martin!
martin

Re: Using filemask with exclude and timestamp

You were almost there:
get -filemask="*.*>2013-5-29 07:11:00| */" *.* .\


It's include_mask|exclude_mask and time constraint is part of the include_mask:
https://winscp.net/eng/docs/file_mask
jonleung

Using filemask with exclude and timestamp

Hi

I'm trying to use -filemask to download files since a certain timestamp, AND exclude sub directories.

On it's own, the timestamp works fine, but it downloads qualifying files in the sub directories too:
get -filemask="*.*>2013-5-29 07:11:00" *.* .\


On its own, excluding sub directories also works fine:
get -filemask="*.*| */" *.* .\


However, when I attempt to combine the two, I get an error:
get -filemask="*.*| */>2013-5-29 07:11:00" *.* .\

Mask is invalid near '>2013-5-29 07:11:00'


I tried wrapping the filemask in double double-quotes (per this link https://winscp.net/forum/viewtopic.php?t=12192) but got errors about changing directory (see below - earlier in the script I changed to the /Downloads folder without issue)

> 2013-05-29 11:37:19.740 Script: get -filemask=""*.*| */>2013-5-29 07:11:00"" *.* .\

. 2013-05-29 11:37:19.740 Retrieving directory listing...
> 2013-05-29 11:37:19.740 CWD /Downloads/*/
< 2013-05-29 11:37:19.762 550 Can't change directory to /Downloads/*/: No such file or directory


Any suggestions?