From you post I've understood that it's WinSCP who displays the error. I have tried PSPad and I have realized that is the editor's error.
This is "expected" behaviour. Let me explain how MDI editors work and why WinSCP does not work with them:
WinSCP needs to know when the edited file is closed:
1) So it can remove the temporary directory where it is stored.
2) Due to Windows limitation it can watch for modification of up to 64 files. If it would not detect that the files is closed, you'll soon reach the limit.
The only working way, I know about, how to detect that the file is closed, is to watch for termination of the application that was launched to edit the file.
Here comes the problem with editors that can open more files in one process. If the editor is already running and the WinSCP run second instance to open new file, the second instance just notifies the first to open the new file and exits immediately. Hence WinSCP expects that the file was closed as well and tries to delete the temporary file.
As PSPad does not lock the opened file, WinSCP succeeds deleting the directory. But then, when you save the file in PSPad it realises that the directory, where the file was opened from, no longer exists. And displays the error.
So far I see no solution for the problem. Except that you configure the editor to use one process for every file. Some MDI editors have such option.
Any idea is welcome.