Posted: 2013-06-04 08:53
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?
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:
You can post new topics in this forum
And it's free!