Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: File are not saving after I edit in notepad

@sk043372: What does it mean "is not reflecting in WinSCP"? Please provide more details.
sk043372

File are not saving after I edit in notepad

Any file I select in WinSCP and open it in external editor Notepad++ after editing, I'm saving it by (CTRL+S) the file which I edited is not reflecting in WinSCP.
abcd abcd

Re: Saving problem when using Notepad++ with WinSCP

Thank you. It worked.
martin

Re: Possible solution, Notepad++ Multi-Instance Mode

@JamJam11355: You should have this behavior, only if you have "External editor opens each file in separate window (process)" enabled in your configuration of Notepad++ in WinSCP. The option is NOT enabled by default.
https://winscp.net/eng/docs/ui_editor_preferences
JamJam11355

Re: Possible solution, Notepad++ Multi-Instance Mode

Confirmed resolution, Notepad++ in Multi-Instance mode does not experience this problem. Using Notepad++ in Single Instance mode causes the issue intermittently with single file edits, and 100% of the time if attempting to edit multiple files simultaneously via WinSCP.
JamJam11355

Possible solution, Notepad++ Multi-Instance Mode

May have found a solution. So far successfully editted 10-out of-10 with by changing Notepad++ to multi-instance mode.

Within Notepad++:
Settings > Preferences > Multi-Instance > Always in Multi-instance Mode
Note: You MUST restart Notepad++ for this setting to take affect.
JamJam11355

Issue persists, Affects WinSCP 5.11.3 thru 5.13.3 at least

I am having the same issue.

In Windows Explorer I can visually observe the local temp directory and file being created by WinSCP, then immediately deleted after it opens in Notepad++.

Using Notepad++ v6.6.6 32bit,
Have tried downgrading WinSCP from 5.13.3 to 5.11.3 – No change,

Tried every option in WinSCP Options -> Storage, problem persists with every setting:
--> System temp directory: same problem
--> Use This Directory: same problem
--> With or without "Append Session Name..."
--> With or without "Append remote path to temp path"
--> With or without "Keep temp copies.. in deterministic paths"
--> With or without "Clean obsolete temp directories"

At this point my best guess is Notepad++ is not sending whatever file in use signal WinSCP needs to detect the file is still being edited. I say this because the deletion behavior is identical to having WinSCP edit a document in Notepad.exe but then closing the Notepad window; (when Notepad is closed, WinSCP deletes the temporary file and directory).
martin

Re: Temp file missing

Thanks for sharing your solution. What folder does WinSCP use, if you use the default Use temporary directory of system?
kalabog76

Temp file missing

Found the solution to the missing temp file (will update here if something isn't right).
Storage/Temporary Directory set to use user's temp location c:\users\yourusername\AppData\Local\Temp in 'Use this directory' instead of the 'Use temporary directory of system'.
This can be setup during the installation(?)
kalabog76

Temp file missing

I have never had to look for this configuration since I used WinSCP and Notepad++. I did uncheck it, and seems to work with connection servers connected to LAN (plus the refresh set to 30sec under panel/remote). But with WinSCP connected to AWS, the same issue: 'keep non-existent file' dialog pops up everytime I switch to another window and back, seems the temp file gets deleted for Notepad++ to not find it, thus the pop-up.
martin

Re: Saving problem when using Notepad++ with WinSCP

In general, make sure you didn't have "External editor opens each file in separate window (process)" checkbox enabled in WinSCP for the 64-bit Notepad++.
https://winscp.net/eng/docs/ui_editor_preferences
martin

Re: 64 bit winscp integration

@kalabog76: Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
kalabog76

64 bit winscp integration

Using a 64-bit version, moving back and forth from Notepad and WinSCP, the temp file goes missing. Moved to 32-bit and the issue disappeared.
Soaku

Re: Saving problem when using Notepad++ with WinSCP

In WinSCP settings, go to "Storage" and check "Keep temporary copies of remote files in deterministic paths". It worked for me.
martin

Re: Saving problem when using Notepad++ with WinSCP

I cannot reproduce the problem. If you face it again, let us know.
LeoS

Re: Saving problem when using Notepad++ with WinSCP

The problem seems to appear only with 64-bit version of Notepad++. I changed to 32-bit version and it works fine.
LeoS

Saving problem when using Notepad++ with WinSCP

When I set Notepad++ as a default editor for WinSCP and open one remote file at a time, it works just fine.
When I open multiple remote files and try to save any other than the first one, I get a message:
The file cannot be saved and it may be protected. Do you want to launch Notepad++ in Administrator mode?

This combination used to work just fine in my previous pc about one year ago.

Now I’m using WinSCP’s internal editor and it works fine but I’d prefer using Notepad++.

Is this more like Notepad++ problem than WinSCP problem? Any ideas how to fix it?