Using filemask with exclude and timestamp

Advertisement

jonleung
Guest

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?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,271
Location:
Prague, Czechia

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
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum