Topic "Using filemask with exclude and timestamp"

Author Message
jonleung

Guest


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:
Code:
get -filemask="*.*>2013-5-29 07:11:00" *.* .\


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


However, when I attempt to combine the two, I get an error:
Code:
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 http://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)

Code:
> 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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
You were almost there:
Code:
get -filemask="*.*>2013-5-29 07:11:00| */" *.* .\


It's include_mask|exclude_mask and time constraint is part of the include_mask:
http://winscp.net/eng/docs/file_mask
_________________
Martin Prikryl
jonleung
[View user's profile]

Joined: 2013-05-29
Posts: 1
This works - thank you so much, Martin!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License