Do you have the latest version of WinSCP?
Works for me. Without the
3*
limitation:
winscp.com /ini=nul /log=!D-!M-!Y.log /script=script.txt /logsize=50K
dir *log*
I get these 6 logs:
10.12.2021 11:01 10 354 10-12-2021.log
10.12.2021 11:01 51 185 10-12-2021.log.1
10.12.2021 11:01 51 196 10-12-2021.log.2
10.12.2021 11:01 51 168 10-12-2021.log.3
10.12.2021 11:01 51 129 10-12-2021.log.4
10.12.2021 11:01 51 171 10-12-2021.log.5
With the same script with the log count limitation:
winscp.com /ini=nul /log=!D-!M-!Y.log /script=script.txt /logsize=3*50K
dir *log*
I get only 4 logs, as expected:
10.12.2021 11:05 41 680 10-12-2021.log
10.12.2021 11:05 51 117 10-12-2021.log.1
10.12.2021 11:05 51 156 10-12-2021.log.2
10.12.2021 11:05 51 196 10-12-2021.log.3