The file is already opened in the notepad как исправить

Я пытаюсь редактировать .CFG в Блокноте ++. Когда я пытаюсь сохранить его, он показывает ошибку:

Я пытаюсь редактировать .CFG в Блокноте ++. Когда я пытаюсь сохранить его, он показывает ошибку:

Check if file is open in another program.

Ранее у меня не было проблем с редактированием файлов конфигурации или сохранением моих изменений. Чтобы решить эту проблему, я попытался закрыть все другие открытые окна, перезапустить Notepad++ и перезагрузить компьютер. К сожалению, ничего из этого не позволяет мне редактировать файл.

Была такая же проблема при настройке apache webserver и php. Выяснил, что это связано с UAC в windows 7. Это не потому, что у вас есть файл, открытый в другом месте. Попробуйте открыть Notepad++ с правами администратора. Либо щелкните правой кнопкой мыши ярлык Notepad++ и выберите команду «Запуск от имени администратора», либо нажмите Ctrl + Shift, а затем нажмите ярлык «Блокнот ++». Затем откройте файл, который вы хотите редактировать, в notepad ++.

Это решило проблему для меня.

Одной из возможных проблем является то, что файл открывается через панель предварительного просмотра проводника, выберите другой файл на панели предварительного просмотра или полностью отключите панель предварительного просмотра.

У меня только была эта проблема, и это было из-за того, что файл был выбран в Проводнике Windows — браузере каталогов. Он показывает предварительный просмотр файла, и я предполагаю, что это приводит к тому, что Notepad++ видит его открытым.

ответ дан Andrew Mallonee131

Обозреватель процессов Sysinternal позволит вам (среди множества других интересных вещей) выяснить все процессы, обращающиеся к заданному пути. Для этого после запуска Process Explorer нажмите CTRL+F (или откройте меню Find — Find Handle), а затем введите соответствующий путь (например, c:somepathtofile.cfg), и он будет покажу вам, какой процесс уже открыт.

Полезно, например, чтобы узнать, какой процесс обращается к диску, который вы пытаетесь размонтировать: просто найдите x: и он покажет вам каждый процесс, обращающийся к диску x: (или его подпути))

ответ дан Olivier Dulac728

Avira (Free) Antivirus также блокирует изменение некоторых файлов

например, C:WindowsSystem32driversetchosts

если у вас есть Avira Antivirus, попробуйте отключить «Real Time Protection» и повторите попытку.

ответ дан Thorsten Niehues526

разрешение администратора (пользователя операционной системы), поскольку оно было заблокировано. Так войти в системе как администратор и дать разрешения на share пыльников пользователя (где вы хотите редактировать).

Это может быть несколько причин:

  • Другая программа открыла файл. Но в вашем случае это не относится, так как вы уже перезапустили систему.
  • У вас нет прав доступа к файлу. Попробуйте переместить его куда-нибудь или «Сохранить как …», а затем заменить оригинал новым.
  • Ты не должен был трогать файл. Если вы пытаетесь что-то отредактировать в Windows , вероятно, предупреждение означает, что вам действительно не следует это трогать.

Это Касперский делает свое дело. Решение заключается в добавлении Notepad++ в группу Trusted.
На самом деле, Kaspersky должен сообщать / всплывающее сообщение всякий раз, когда он блокирует программу, но в этом случае это не так.

Let me see if I understand the situation:

  1. You have a file, let’s call it original.txt, open in Notepad++
  2. You use File > New to create a new tab in Notepad++, and then edit that new tab.
  3. You choose File > Save (or File > Save As…), and select the same path and name as original.txt
  4. Notepad++ asks you if you want to replace it, and you say Yes
  5. Notepad++ informs you with an ERROR dialog that “The file is already opened in the Notepad++”

I concur, that is the current behavior (v7.5.8 32-bit).

To me, that seems a reasonable behavior. If you really want the contents of your new tab (labeled as new # for some numeric value of #) to be saved as a file you already have open, there are two easy options: 1) close the original tab, then do the Save/Save As… from the new # tab; or 2) copy the contents from the new # tab to the original.txt tab, and do the Save from the existing original.txt tab.

Okay, I just tried a couple of my older portable/standalone versions: at least as far back as v7.5.0, it’s been under the current behavior, so it’s not a recent change. Ah, there, v7.4.2 32-bit (from Jun 2017) shows the behavior you seem to want: When I say Yes on step #4, it does save… now I have two tabs in the same editor that claim to be the same file with the same name, and both claim to be saved, but one has the “original text that I typed”, and the other has the “new text that I saved overtop”, so there is introduced confusion over which is most recent. If you wait long enough, Notepad++ may recognize that the two are out of date, and update the old instance to the new instance.

Personally, I would find that situation (two copies of the same file that at times get out of date with each other) more confusing than the current situation.

But if the current behavior really bothers you, I would recommend you follow the instructions in this FAQ for submitting bug or feature requests, and say something like “back in v7.4.2, I could have original.txt open, and create a new file, then use Save As to save the new file overtop of original.txt, but from v7.5 thru the current v7.5.8, it tells me ERROR “The file is already opened in the Notepad++””, and ask if the development team can put the behavior back to the v7.4.2 behavior. It won’t guarantee that your request will be implemented, but it will put the request in the appropriate spot so it can be properly tracked.

I have Notepad++ portable «installed» and if I try to open a file from Windows Explorer that should open with Notepadd++ portable I get the error

Another instance of Notepad++ is already running. Please close other instances of Notepad++ before launching Notepad++ portable.

My problem is I don’t want to open a separate instance, I want the file to open with the existing instance.

I found a blog post on how to get around this issue by opening multiple instances http://mattrefghi.com/blog/2010/11/how-to-launch-multiple-instances-of-notepad/
but like I said, I’d prefer the file to open in my currently running Notepad++ window

I am able to drag & drop the file in the existing window and it works, but double clicking won’t open the file.

Anyone know a trick to make this work?

asked Aug 16, 2012 at 16:51

Justin Garrison's user avatar

3

You need to point to the application executable, not to the launcher.
If you point to :

X:PortableAppsNotepad++PortableNotepad++Portable.exe

it doens’t work and tells you Notepad++ is already running.

But if you point to :

X:PortableAppsNotepad++PortableAppNotepad++notepad++.exe

then everything works as expected.

answered Oct 23, 2014 at 12:04

Frédéric LECHAIGNE's user avatar

I have seen this issue happen when Notepad++ crashes when it is closed. Although the application window appears to close, the Notepad++ process is still running. You can check the task manager and kill it off from there.

This is usually caused by a plugin. You can move or rename the plugin directory and see if Notepad++ closes cleanly. If it does then add the plugins back one at a time to identify the misbehaving one.

answered Aug 16, 2012 at 17:28

p0rkjello's user avatar

p0rkjellop0rkjello

5743 silver badges9 bronze badges

1

This may help. You may change the default program to make sure it always open in portable NPP++. See this

EDIT:

I also like portable apps and setups. I use Liberkey for that. It has a portable file association app that can do the default program without writing to system registry I guess.
You may also use portable apps for the same.

answered Aug 16, 2012 at 18:18

Stat-R's user avatar

Stat-RStat-R

1,3202 gold badges16 silver badges29 bronze badges

3

I had the same problem, then I updated my portable Notepad++ to 6.3 Rev 2.

It works just fine now.

slhck's user avatar

slhck

219k68 gold badges592 silver badges580 bronze badges

answered Feb 20, 2013 at 11:57

c0l3's user avatar

I had the same problem. In my case 2 installations of notepad ++ were on the harddisk.
The portable version was used based on file association, the installed one was pinned to the task bar.
When the portable version detected, that the installed one was running already I got that message. Hope that helps…

answered Apr 12, 2013 at 15:36

guest's user avatar

The notepad++ settings for Preferences — Multi-Instance set to Open Session in a new instance of Notepad++ seems to solve this problem for me.

Edit
The problem was also the default setup I had for txt files — right click on the file you want to open in an already existing instance of Notepad++ and check if it is using the correct program to open the file.

In my case, I had two
1. Notepad++: A free (GNU) source code editor
2. Notepad++ Portable (PortableApps.com Launcher)

Choosing 1 opened the txt file in the existing instance of Notepad++ if the settings in Preferences — Multi-Instance was set to Default(Mono-Instance)

Choosing 2 cause the error pop-up «Another instance of Notepad++ is already running …..»

Community's user avatar

answered Oct 14, 2014 at 18:22

PY C's user avatar

In my case the issue was, that I already had the 32-bit exe open and the explorer open with was configured to open the 64-bit version.
Just make sore to use the same version everywhere (i.e. there may be a native Windows installation and the 32-bit and 64-bit portable apps, ..

answered Jul 29, 2021 at 12:32

TmTron's user avatar

TmTronTmTron

1176 bronze badges

Понравилась статья? Поделить с друзьями:
  • The file driver booster seems to be corrupt как исправить
  • The file could not be written due to an error illustrator
  • The file could not be loaded or is corrupt setup cannot continue error code 0x7e
  • The file cannot be opened because of a header error что делать
  • The file cannot be opened because of a header error premiere pro