Topic "problem with Date"

Author Message
karraso
[View user's profile]

Joined: 2013-06-04
Posts: 1
Hello,
This is my first topic, so hello everybody and please be forgiving.
I would like to dowload file via sftp command

get -filemask="AdvCfg_dump_*.log> %date:~3,4%-%date:~8,2%-%date:~11,2% 05:00:00| */" *.* F:\fewa\

where the * in AdvCfg_dump_*.log is current date eg AdvCfg_dump_04062013.log
but %date:~3,4%-%date:~8,2%-%date:~11,2% doesn't work. I would like to copy files with current date only.
How to do it? Is it possible?
Br
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
WinSCP does not support environment variable formatting.

You need to generate the script file with the formatted mask using external script. Or use WinSCP .NET assembly.

For both solutions, refer to this related example:
https://winscp.net/eng/docs/script_download_timestamped_filename
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License