Topic "problem with Date"

Author Message
[View user's profile]

Joined: 2013-06-04
Posts: 1
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?
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
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:
Martin Prikryl

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License