the error "cannot remove temporary directory '<empty>' " comes with W10 Build 1709 AND Build 1803
WinSCP Versions: 5.11.3, 5.13.2 and 5.13.3
Used external editors: notepad++ 7.5.4 and notepad++ 7.5.8 (x64)
This error doesn't occur with Textpad 5.4.2
UPS, OK, I think I found it, but I leave this post here for others:
In the extrernal editor settings, there is an option "External editor opens each file in separate windows (process)" - this option was marked and I get the error above.
Now I remove this option and it looks good.