Can't upload just the today files

Advertisement

gel
Joined:
Posts:
3
Location:
Italy

Can't upload just the today files

Hi, I'm trying to utilize WinSCP for the first time, so I'm sure it's my fault.
I have many files in a folder, every day new files are saved inside that folder, I have to transfer just today files.

But I couldn't achieve this apparently easy task:
uploading just the today files.

I'm trying to use filemask in this way (batch file):
"put -filemask="*.txt>=today" " ^

The script fails, the log reports:
Script: put -filemask=*.txt
< 2020-11-23 12.12.00.045 Script: Missing parameter for command 'put'.

Could you help me to find the right way to achieve that task?

Thanks,
Alberto

Reply with quote

Advertisement

gel
Joined:
Posts:
3
Location:
Italy

Re: Can't upload just the today files

Hi,
I tried with your suggestion, but no difference (log lines attached):
Script: put -filemask=*.txt>=today
< 2020-11-24 12.08.26.829 Script: Missing parameter for command 'put'.

Alberto

Reply with quote

gel
Joined:
Posts:
3
Location:
Italy

Re: Can't upload just the today files

Now it works, thanks.

I read quite a few pages of your documentation, but couldn't solve my problem, I think because of lack of examples (it's just for your info, inthe hope that can help to improve the online documentation).
e.g. the example in the PUT help page
put -filemask=*.html -resumesupport=on *
made me think that my previous version could be ok, but it wasn't the case (and I can't understand why).

In the filemask help page I couldn't find an example with the filemask AND another switch (like LATEST) and I couldn't understand how to have LATEST and filemask >= TODAY working togheter (my final goal).

best regards, thanks,
Alberto

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
35,415
Location:
Prague, Czechia

Re: Can't upload just the today files

gel wrote:

I couldn't understand how to have LATEST and filemask >= TODAY working togheter (my final goal).
So what is your final goal? If there are any today's files, upload the latest one – Otherwise do nothing?
"put *.txt -latest -filemask=>=today" ^

Reply with quote

Advertisement

You can post new topics in this forum