All SFTP servers, I've ever encountered, returns always at least the dot entries (
..) 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:
put -delete *.txt
put -delete *.EDIFACT
get -delete *.edi *