Upload files younger than 2 days

Advertisement

User582
Guest

Upload files younger than 2 days

Hi, I want to upload .bak files younger than 2 days to another location. When specifying exact name of file it uploads but when I use filemask, it fails.
open sftp://(destination) -hostkey="ciphers"
option confirm off
lcd (location)
cd (remote location)
put *.bak>2D
exit
Is this line right?
put *.bak>2D
The log returns this, so probably the syntax is wrong, i tried many options but nothing worked.
File or folder '*.bak>2D' does not exist. ("System Error. Code: 123.

. 2021-05-25 09:42:11.751 The filename, directory name, or volume label syntax is incorrect")
* 2021-05-25 09:42:11.751 (EScpSkipFile) File or folder '*.bak>2D' does not exist.

Reply with quote

Advertisement

User582
Guest

Thanks for reply, this gives me "Script failed".
> 2021-05-25 13:13:28.895 Script: put *.bak -filemask=>2D
. 2021-05-25 13:13:28.895 Script: Failed
> 2021-05-25 13:13:28.895 Script: exit
. 2021-05-25 13:13:28.895 Closing connection.
. 2021-05-25 13:13:28.895 Sending special code: 12
. 2021-05-25 13:13:28.895 Sent EOF message

Could it be because Im sing very old version of WinSCP? (4.3.7) on Windows Web Server 2008

Reply with quote

Advertisement

You can post new topics in this forum