All SFTP servers, I've ever encountered, returns always at least the dot entries (.
and ..
) for empty directories. WinSCP is indeed not compatible with your server.
I am getting error: "Error listing directory - server returned empty listing for directory" when the directory is empty. WINSCP returned status Failed and hence stopped the script. I tried running WINSCP and logging in interactively, this same error popped up, I clicked ok and can transfer file as normal. I do not get any error when using filezilla. This error happened when I try to get file but no error when I try to put file into the same directory. Appreciate if you could help.
my script look like this:
lcd "\\ABC\bor\Liverpool\Nestle-Testing-IFTMBC\"
put -delete *.txt
lcd "\\ABC\bor\Liverpool\Nestle-Testing-CONTRL"
put -delete *.EDIFACT
lcd "\\ABC\bor\Liverpool\Nestle-Testing-IFTMBF\"
get -delete *.edi *