# Notepad++ “Check if file is open in another program” No other program open

I've come upon a rather perplexing problem while editing a .CFG file in Notepad++ (for Step 8 of this). Previously, I have had no problem editing the configuration files for Amnesia or with saving my changes. To fix this problem, I have tried closing all other open windows, restarting Notepad++, and restarting my computer. Unfortunately, none of this has worked.

Please, if you have the answer, try to put it in fairly English-based terms (like the tutorial that I placed a link to). I have a rather basic grasp of how the program works and how to use computers, but I certainly would not be capable of creating a program from scratch or making any major changes to my computer. Thank you very much for dealing with my lack of knowledge!

-
See if you can copy the file elsewhere, edit, then overwrite the original. If not, use Process Explorer or a program similar to Unlocker to figure out what's locked the file. –  Karan Dec 28 '12 at 21:28
Similar one is answered here: stackoverflow.com/q/2763067/948268 –  Kuldeep Jain Feb 25 at 14:28

## migrated from stackoverflow.comDec 28 '12 at 13:33

This question came from our site for professional and enthusiast programmers.

Had the same problem when setting up apache webserver and php. Found out that this is due to the UAC in windows 7. It's is not because you have the file open anywhere else. Try opening Notepad++ as administrator. Either right click Notepad++ shortcut and choose run as admin or ctrl+shift and click notepad++ shortcut. Then open the file you want to edit from within notepad++.

This solved the problem for me.

-
+1 for pointing out that it's UAC. I've seen this before. –  MDT Guy Dec 18 '13 at 16:21

Sysinternal's Process Explorer will allow you (amon many other neat things) to find out all the processes accessing a given path. To do this, once Process Explorer is started, press CTRL+F (or open menu Find - Find Handle), and then type the relevant path (ex: c:\some\path\to\file.cfg), and it will show you which process have this opened.

Usefull, for example, to find which process is accessing a drive you try to unmount: just search for x: and it will show you every process accessing drive x: (or it's subpath))

-

I just had this issue and it was due to having the file selected inside of Windows Explorer - the directory browser. It shows a preview of the file and I guess that causes Notepad++ to see it as being open.

-
Confirmed repro—on unselecting the file in Windows Explorer, the file could be opened again. Not the only cause of this error, but worth checking. –  Jordan Gray Dec 18 '13 at 15:59
This is not just I Notepad++ thing either. It seems just having the file selected in Windows Explorer marks the file as opened and can not be saved. –  Andrew Mallonee Jan 21 at 15:05
Yup, it's pretty perverse that Windows Explorer's preview pane can lock files. Really counter-intuitive, very confusing and so easy to fall foul of. –  Jordan Gray Jan 21 at 22:57

permission of admin (Operating System User), as been blocked. So log-in as admin and give share permission to anther user(where you want to edit).

-

It could be several causes:

• Another program has opened the file. But in your case this do not apply since you already restarted the system.
• You don't have permissions to access the file. Try moving it somewhere, or "Save as..." then replace the original with the new one.
• You shouldn't been touching the file. If you are trying to edit something in \Windows, is probable that the warning means that you really shouldn't touch that.
-