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

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 8.1 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 design...in every OS I have ever used.
My System SpecsSystem Spec
15 Apr 2012   #5

Win 7 Pro x64 SP1, Win 7 Ult x86 SP1
 
 

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,
David

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 8.1 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
Reply

 Unintended Creation of Files




Thread Tools



Similar help and support threads for2: Unintended Creation of Files
Thread Forum
Unintended Consequence: Desktop now tops Library hierarchy Network & Sharing
PDF Creation Software
Custom .bat .cmd files creation help. General Discussion
PCs for media creation General Discussion
Font creation Software

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 04:48 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33