Saving problem when using Notepad++ with WinSCP

Advertisement

LeoS
Guest

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?

Reply with quote

Advertisement

LeoS
Guest

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.

Reply with quote

Soaku
Guest

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.

Reply with quote

kalabog76
Guest

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

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.

Reply with quote

kalabog76
Guest

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.

Reply with quote

kalabog76
Guest

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(?)

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Temp file missing

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

Reply with quote

JamJam11355
Guest

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).

Reply with quote

JamJam11355
Guest

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.

Reply with quote

JamJam11355
Guest

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.

Reply with quote

Advertisement

sk043372
Guest

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.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum