Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

rico wrote:

get -filemask ="*>=10D"

There should not be any space after the -filemask:
get -filemask="*>=10D"
rico

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 ;-)
martin

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.
felixramses

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\"
dbabmr

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.