Topic "GetFiles() with specific last modified date"

Author Message
Mocoso

Guest


How can I GetFiles() with a specific last modified date (e.g. 2013-03-17)?

Can I use something like:
Code:
ls -l /var/log/ | grep 2013-03-17
with WinSCP.dll?

Thank you!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Use time constraint in TransferOptions.FileMask:
http://winscp.net/eng/docs/library_transferoptions
http://winscp.net/eng/docs/file_mask#size_time
_________________
Martin Prikryl
Mocoso

Guest


I have tried various masks to get a specific date (e.g. 2013-03-17) with no success. Can you provide some insight?

Examples:
Code:
 $transferOptions.FileMask  = "access*.log*<2013-03-18;access*.log*>2013-03-16"

or
Code:
 $transferOptions.FileMask  = "<2013-03-18;>2013-03-16"


I am getting all files.

Thank you.[/code]
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
$transferOptions.FileMask = "access*.log*>=2013-03-17<2013-03-18"[/code]
_________________
Martin Prikryl
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