How to download today's file using script

Advertisement

GianTrinidad
Guest

How to download today's file using script

Hello all, i would like to know how to build a script to download a file that someone has previously uploaded in server today, i mean not downloading the old ones but only the file with today's date.

Any help is really appreciated. Thanks.

Reply with quote

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

Re: How to download today's file using script

For general scripting, please refer to:
https://winscp.net/eng/docs/guide_automation

And use get command with -filemask switch with time constraint:
get /path/* -filemask=*>1D    

or:

get /path/* -filemask=*>=%TIMESTAMP#yyyy-mm-dd%    

https://winscp.net/eng/docs/script_download_most_recent_file
https://winscp.net/eng/docs/file_mask
https://winscp.net/eng/docs/scriptcommand_get
https://winscp.net/eng/docs/scripting#timestamp

Reply with quote

Advertisement

You can post new topics in this forum