Filemask is not behaving as expected

Advertisement

fredangel
Guest

Filemask is not behaving as expected

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?

Thanks!

Reply with quote

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

Re: Filemask is not behaving as expected

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

Reply with quote

fredangel
Guest

Re: Filemask is not behaving as expected

I am using the latest version.

martin 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!

Best

Reply with quote

Advertisement

You can post new topics in this forum