Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Unintended Creation of Files

14 Apr 2012   #1

Windows 7 Home 32bit
Unintended Creation of Files

Hey guys, I frequently like to pull Notepad up, jot down my thoughts kind of like a journal thing, and then store them in a special folder. There's no special organization yet, they literally are just kind of my random thoughts that I'd like to come back to without forgetting about them, and if they merit further attention, I come back to them. With that said, I noticed a peculiar bug that I think is part of the operating systems fault, not Notepad's.

The bug happened when I opened one of my thoughts I had written down, realized I needed to give the file a better name than just "thought" as well as correct a typo. First thing I did was fix the typo, did not save the file yet, right clicked on the file icon to rename it, changed the name, and once the file's name had been changed, I hit the exit button with my mouse. It prompted me to save changes, and so I clicked yes, even though it still had the old name as the file to save it as. Sure enough, Windows 7 decided that I needed a file with that name and created a new one for me, effectively give me the same file twice, one with the old name which had newly been created, and one with the name I changed it to.

While I'm guessing this could be an application error in how the programmer is making API calls to the underlying system, I think this is simply the operating system behaving in an unintended way and it should update any application running with the correct name because while my simple little case required duplication generated only a few bytes, imagine the same thing happening for massive files. I am assuming that Windows 7 allocated separate memory for this, which if it isn't, then my bad, but I would still call it a minor bug, even in that case. What do you guys think?

My System SpecsSystem Spec
15 Apr 2012   #2

Windows 7 Home Premium 64-bit

When saving, use 'Save As' instead of 'Save'.

Lets you rename the file, change the save location etc.

There's no need to right-click on icons to change names.

As you have done it, the file with the NEW name will be the OLD file, and vice-versa.
My System SpecsSystem Spec
15 Apr 2012   #3
A Guy

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x64 SP1

You did create a new file If you had right clicked the unopened files icon , and choosen rename. Then it would rename the file. But the method you used will indeed create a new file, and save it with the new name and changes. the original file will remain, without any changes. As Katanyavich mentioned, using his method would actually make the changes to the original file. A Guy
My System SpecsSystem Spec

15 Apr 2012   #4

Windows 10 Pro (x64)

I don't know how long you have been doing this or using a computer. However, I have never seen what you are describing as the file system should work on any OS that I have used. Editing a file in some program, then go though Explore to rename it...does not ever effect the program. It either uses the old name on save, creates a new file with the old name on save, or errors out when it cannot find the file with the old name. I have never seen it work in the way you thought it did.

Even if Windows was to tell an application whether a file has changed its name or location would still be at the discretion of the application to make that happen. The application would have to be programmed to monitor the file in question for any changes. Windows itself, won't because that is not its job nor should it make assumptions of how an application is going to use a file.

tl;dr, Not a bug in Windows, not a bug in the application. By every OS I have ever used.
My System SpecsSystem Spec
15 Apr 2012   #5

Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64

Hello Layke1123 and welcome to Seven Forums.

For what you do, have you considered using some editor other than Notepad?
A popular recommended choice is Notepad++.
I prefer Crimson Editor.
These are free, and there may be other editors someone else could recommend.

Textpad is another editor I've used and like, but the last i know it's Shareware.
Put up with nag messages, or pay for the registered version.

These editors allow viewing/saving/editing multiple files in one Window.
You could have Thought1, Thought2, etc. files open in one Window at the same time, and easily switch between files.

I prefer Crimson because it has Print Preview.
Crimson is end of life (bummer), but it does work with Win 7.
Notepad++ does NOT have print preview that i know of (bummer), but it does have Rename.

You would have a bit of a learning curve, but it might well be worth it.
After you learn these editor(s) copying, editing, saving, viewing new/multiple files is easy, and a nice improvement over Notepad.

Below are some screen prints so you can see what I'm trying to explain.

Hope this helps,

Unintended Creation of Files-crimsonscrprt-01.png

Unintended Creation of Files-np-scrprt-01.png

My System SpecsSystem Spec
15 Apr 2012   #6

MS Windows 7 Ultimate 64-bit SP1

Windows was behaving normally and did what it was supposed to do when you did the above procedure.

When you open a text file in notepad, the file is loaded in to RAM and the notepad program also load the file name in RAM while you are editing it. Then you went back to windows explorer and changed the original name of the opened file on the hard disk.

Normally when a file is opened in an application, the application will lock the file to prevent such untoward changes while it is opened. But it seems that notepad does not do this and you were successful in changing the file name.

Afterwards, when you tried to save the file in notepad (not Save As), it will look in the folder for the same file and if found will overwrite it. But in this case the file name has been changed by you. So the notepad program does not find the file in the original location. Hence it will create a new file with the same old name upon save command.

That is how you end up with two different files.

This normally happens when you try to do more than one thing on a single file. Hence take care not to change the name of the file while it is opened in another application.
My System SpecsSystem Spec
16 Apr 2012   #7

Windows XP

Have you scanned your PC with Antivirus program it seems to be a case of virus program.
My System SpecsSystem Spec
16 Apr 2012   #8

Windows 10 Pro (x64)

Quote   Quote: Originally Posted by henrywilliams View Post
Have you scanned your PC with Antivirus program it seems to be a case of virus program.
What?! Where did you get that foolish idea?
There is nothin about this case that says virus.
My System SpecsSystem Spec

 Unintended Creation of Files

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar help and support threads
Thread Forum
Law of Unintended Consequences - Top model cars can't be insured !!!!
Hi there Shows how the "Law of Unintended Consequences" always apples -- the latest case is with the case of these top of the range (and increasingly Not so top of the range) Cars that don't have old fashioned mechanical ignition keys any more. Crooks are increasingly getting "skimmers" etc...
Chillout Room
PDF Creation
Does anyone know of software that will create a PDF file from scratch without using another application such as Word, notepad, etc?
Custom .bat .cmd files creation help.
Hi, I want to create a .bat or some self executable file that will clear my files on each shutdown or startup. Like all temp folders, some files like desktop.ini, temporary files created by programs, ect. Is this possible? If it is, how should I go about it?
General Discussion
Please help with start orb creation !!
I followed the all details of this tutorial : And I made my own orb !! But when I apply the orb it comes a little brighter !! See the images and please help me with this !! I really want to know how to do my own orbs...

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 00:20.

Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App