filemask using days, e.g *>=1D Is 1D = 24 hours or just the calendar day prior?

Advertisement

dbabmr
Joined:
Posts:
1

filemask using days, e.g *>=1D Is 1D = 24 hours or just the calendar day prior?

If I use -filemask="*>=1D", does that compare just the day component of time, or does it compare using 24 hours? Example, if source file was created 25 hours ago at 7am my time yesterday, if I do a get using *>=1D", will that file get picked up? The date is one day old, but the time is more than 24 hours ago. Thanks.

Reply with quote

Advertisement

felixramses
Joined:
Posts:
1

Mask is invalid near 'yesterday'

Hello, I'm making a batch that downloads the files with last modification of the previous day. When I use the 1DS mask or 'yesterday' when I run it it sends me a message that it is invalid. It only lets me use it with 1D but this doesn't work for me.

the part of the instruction that fails is the following:

get "/CONV/*.gz>yesterday" "C:\FILEBASE\FILE\DAILY\LANDING\"

or
get "/CONV/*.gz>1DS" "C:\FILEBASE\FILE\DAILY\LANDING\"

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,552
Location:
Prague, Czechia

Re: Mask is invalid near 'yesterday'

felixramses wrote:

Hello, I'm making a batch that downloads the files with last modification of the previous day. When I use the 1DS mask or 'yesterday' when I run it it sends me a message that it is invalid. It only lets me use it with 1D but this doesn't work for me.
You probably have an old version of WinSCP, which does not support the S suffix yet. Make sure you have the latest version.

Reply with quote

rico
Joined:
Posts:
1
Location:
France

Hello,

I start with Winscp and I do not understand why my filemask does not work. I would like with this option upload to my local computer, files having my 10 days being on my seedbox.

# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
open ftp://xxxxxxxxxxxxxxxxxxxxnet
# Force binary mode transfer
option transfer binary
# Interface 1
cd /Downloads
lcd "C:\temp"
#Copy and filter
get -filemask ="*>=10D"
# Disconnect
#close
# Exit WinSCP
exit

But in return he tells me that they do not find matching files ... While there are ...
If i do get *.* no problem, but with filter doesn't work
Do you have an idea?

Thank you.
sorry for my English ;-)

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum