Topic "Filemask is not behaving as expected"

Author Message


Hi everybody,

I need an automated process which downloads files from remote and than deletes them. What I try to avoid is that I download a file and delete it, while it's being uploaded by another person. Therefore I wanted to use the filemask feature.

If I use:
get -filemask="*.zip<2012-12-14 14:00:01" *

all zip files are downloaded. I expected that only files that were last modified before 2012-12-14 14 o'clock would be downloaded.

Can please somebody tell me if I am doing something wrong or did I miss something in the documentation?

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
Location: Prague, Czechia
Make sure, you have the latest version of WinSCP. If it does not work even with the latest version, please attach a log file.

Also something like *.zip<1H (files older than 1 hour) might be more appropriate for your task.
Martin Prikryl


I am using the latest version.

prikryl wrote:
Also something like *.zip<1H (files older than 1 hour) might be more appropriate for your task.

It's still not working how I expected, but thank to your hint the script does what I want. We the following command I got the job done.
get -preservetime -filemask="|*/; *.?*>300S" *

With this filemask I get all the files (no directories) which are older than 5 minutes. That's exactly waht I wanted. I thought it should be <300S, but that was wrong.

Thanks again for your support!


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License