Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The Scenario is as follows: I am using Windows XP. Suppose I have a text file in desktop named foo.txt.

  1. I open foo.txt the first time and start making changes and I have not yet saved, so the state of notepad program is that the file foo.txt is open in notepad program and changes are not saved.
  2. Now I go to desktop and open foo.txt again and Windows XP allows me to open foo.txt with its old version without any modifications. The state of the notepad program is that there are two instances of the same file foo.txt open in two different instances of notepad program.
  3. Suppose I am a forgetful person, so I forgot that in the first instance of foo.txt, I have already made some changes. I see my PC and see the second instance which is active and I start making some changes.. Now the state is that there are two instances of the same file with different modifications of mine. And now I save the latest active file(second instance). Then I see the existence of the first instance of the file which is still open.. then I tell OMG.. So natural instinct is that I again open foo.txt which is having the latest changes and then I try to merge the changes from both the instances..

Instead of all this, can Windows detect that the file is already open and point me to the already opened file and allow me to make my changes peacefully??

UPDATE: I wanted to know if Windows 7 has atleast taken care of this issue.. But still the bug exists in Windows 7... :(

share|improve this question

closed as not constructive by studiohack Feb 27 '12 at 15:48

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
While we all know that Windows is full of bugs, do you think that this behavior would be "unfixed" for 25 years (which is how long Windows and Notepad have existed) if it were really considered a bug? –  Paul Richter Feb 27 '12 at 9:44
2  
There is a simple saying: "The machine has no brain so use your own." –  Mose Feb 27 '12 at 9:45
    
It's not a bug. –  Alan B Feb 27 '12 at 9:47
    
I feel bad for application designers at Microsoft, who have to deal with end users. –  ta.speot.is Feb 27 '12 at 9:48
    
@PaulRichter: Fixing a bug for software depends on how seriously the developer cares about the bug. If I were to have an opportunity to make changes, I would readily do it, than putting a layman user in a sorry situation. The very reason why locking functionality would have come up and extended to Word etc.. is by analysing the bugs of Notepad and other old software. But it does not stop the developer to fix the bugs of Notepad. He could have gone ahead and fixed for Notepad and shipped it... and Mose: The very reason beautiful software is created nowadays is that we need to use brains less. –  gansai Feb 27 '12 at 9:51
show 1 more comment

3 Answers

up vote 3 down vote accepted

I would suggest that a bug is a deviation from advertised or reasonably expected* functionality. Microsoft advertised (in the Windows 7 help file) Notepad as:

Notepad is a basic text-editing program and it's most commonly used to view
or edit text files.

No advertisement is made of funcionality that maintains only one open copy of any file, and my 'reasonable expectation' of a 'a basic text-editing program' would not include such a feature either. As such, I do not believe that what you describe can be reasonably called a 'bug', but a 'feature request'.

share|improve this answer
add comment

This is not a bug but by design.

Notepad doesn't have the concept of locking files (as in "proper" word processors like Word etc.). Therefore what you are seeing is to be expected.

Notepad is only really meant for quick edits to simple text files (such as .bat file). If you want this sort of functionality then you need to install and use something like Notepad++.

share|improve this answer
    
When it comes to a layman who uses the program, he should not be put in a sorry situation. I think it is not a mountainous task for Windows XP developers to extend that locking functionality for Notepad also. Assuming that large number of people still use Notepad. –  gansai Feb 27 '12 at 9:41
add comment

It sounds like you're relying on doing important work with notepad. This isn't wise. Notepad does not perform a file lock on its active files which means any other process is free to open and read/write to your file even while you're working with it in notepad.

You should find an alternative text editor for your work if that is an issue for you but the reality is it's easier to check yourself if the file is open (if it's not shared and potentially network users have access to it) than it is to try and enforce file locking.

share|improve this answer
    
I am not doing important work with notepad. I happened to notice this bug and posted in Superuser. Well I use Notepad++ while I am running Windows and While I use linux, I will be using VI. –  gansai Feb 27 '12 at 9:45
    
It's not a bug, notepad utilises the lock-open-unlock-edit- lock-save-unlock method, which has its advantages and disadvantages. You will need to use another editor to achieve what you want, or write a wrapper for notepad. –  deed02392 Feb 27 '12 at 10:52
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.