Issue with -latest switch

Advertisement

dkratter14
Joined:
Posts:
1

Issue with -latest switch

WinSCP 5.9.3

I'm trying to download the latest files that match a mask.

"open sftp://user:pass@host:port" "get /path/to/abc_*.csv /path/to/xyz_*.csv d:\downloads\ -latest" "exit"

I want it to get the latest file that matches abc_*.csv AND ALSO get the latest file that matches xyz_*.csv. So it should download two different files.

However, the behavior seems to be that it gets the latest file that matches abc_*.csv OR xyz_*.csv. It downloads one file.

Is this the expected behavior? Is there some way to get it to download two files?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Issue with -latest switch

Yes, this is an expected behavior. To get two files, use two get commands, each with one of the masks.

Reply with quote

Advertisement

You can post new topics in this forum