Resolved
I discovered the problem, in fact it is because it is necessary to enter the folder where the file will be extracted, the problem itself was not in WinSCP, but in the code, it was only necessary to insert a
cd
after downloading the file.