Error when editing remote file

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
jslegers
Member
Member
Posts: 129
Joined: 2003-07-17, 08:13 UTC

Error when editing remote file

Post by *jslegers »

Hi,

I have a question. I use Notepad++ as my editor. When I connect via SFTP to a linux machine and I want to edit a file via F4 I get the follwoing error in Notepad++ file not found because folder is not found. See image.

Image: https://i.imgur.com/xHiNjtx.png

How can I fix this?
User avatar
nsp
Power Member
Power Member
Posts: 1917
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Error when editing remote file

Post by *nsp »

If you defined notepad++ as external editor and edit using F4 button you should not get this error.
If you use a button or em_ command with %P%N as parameter u have such error. This will never works for wfx sftp,ftp cloud,....

For ftp,sftp... in order to edit, TC copy file to temporary folder and open your editor with temporary File and propose to upload it when finished.
The best is to use external editor or special association.
User avatar
jslegers
Member
Member
Posts: 129
Joined: 2003-07-17, 08:13 UTC

Re: Error when editing remote file

Post by *jslegers »

Ah ok thanks. I have used an em command because I wanted to start Notepad++ as administrator. But I can't do that with external editor correct?
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Error when editing remote file

Post by *petermad »

2jslegers

Maybe you can make a .lnk file thta points to notepad++, where you set it up to open as administrator and then use that link in TC's "Configuration" -> "Options..." -> "Edit/View" -> "Editor for F4"
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: Error when editing remote file

Post by *JOUBE »

When editing SFTP files, no administrator rights are required (even if you have logged on to the remote computer via SFTP as an administrator (e.g. root)), because of:
nsp wrote: 2023-07-07, 07:18 UTCFor ftp,sftp... in order to edit, TC copy file to temporary folder and open your editor with temporary File and propose to upload it when finished.
Joube
User avatar
jslegers
Member
Member
Posts: 129
Joined: 2003-07-17, 08:13 UTC

Re: Error when editing remote file

Post by *jslegers »

petermad wrote: 2023-07-07, 10:00 UTC 2jslegers

Maybe you can make a .lnk file thta points to notepad++, where you set it up to open as administrator and then use that link in TC's "Configuration" -> "Options..." -> "Edit/View" -> "Editor for F4"
Ah ok that is also an option thanks.
JOUBE wrote: 2023-07-07, 10:14 UTC When editing SFTP files, no administrator rights are required (even if you have logged on to the remote computer via SFTP as an administrator (e.g. root)), because of:
nsp wrote: 2023-07-07, 07:18 UTCFor ftp,sftp... in order to edit, TC copy file to temporary folder and open your editor with temporary File and propose to upload it when finished.
Joube
Clear thanks.

@Ghisler maybe a nice new feature for upcoming version 11 to start the Editor as Admin.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Error when editing remote file

Post by *Hacker »

jslegers,
start the Editor as Admin
Can you name some examples of what that could be used for?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
HerbieH
Member
Member
Posts: 154
Joined: 2003-02-11, 10:04 UTC

Re: Error when editing remote file

Post by *HerbieH »

Hello hacker.
You wrote (concerning admin mode and Notepad++)
Can you name some examples of what that could be used for?
Actually a good question, but this is a subject that should be put in a completely different thread like: 'Why are people using admin mode in different situations?'.
It is like every time someone mentions admin mode in any TC thread, somebody ask 'why?' You might as well ask 'Why use TC?, Why use Windows?, Why did you paint your computer red?. All good questions, but really not relevant for solving the initial problem presented by the author.


Hello jslegers.
Let's face the elephant in the room.
If you run Total Commander as administrator, all programs started from Total Commander will automatically be run as administrator incl notepad++.
I use notepad++ from TC (both run with admin rights) as an editor for (s)ftp-server text-files without any problems.

Many people however, don't think it's a good idea, to always run TC as admin. -Just saying (or perhaps 'trumpeting' :)
HerbieH*
-Keep on makin' music!
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Error when editing remote file

Post by *Hacker »

HerbieH,
Well, first I would like to understand what the problem is. If the OP runs TC as admin, the editor will run as admin as well, as you correctly noted. If he does not, it should not prevent him from editing the file from SFTP even when the editor is not run as admin either (%TEMP% should be user-writable). For any other editor task, if TC can reach a given dir, an editor using the same rights should be able to reach the same dir as well. So I wonder, what situation is he trying to solve, where he runs TC as a normal user, but needs to edit a file from TC in an editor run as admin. Since I can't really think of any such situation off the top of my head, I am asking.

As I understand, the initial problem was already solved, unless it broke something else in the process.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
jslegers
Member
Member
Posts: 129
Joined: 2003-07-17, 08:13 UTC

Re: Error when editing remote file

Post by *jslegers »

Hacker wrote: 2023-07-07, 11:41 UTC jslegers,
start the Editor as Admin
Can you name some examples of what that could be used for?

Roman
Editing files in Program FIles for example.
But I have made a fix for myself Shift-F4 to start Notepad++ as administrator.

Thanks for the help.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Error when editing remote file

Post by *Hacker »

jslegers,
That's a good example, thanks.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply