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: Windows deletes wrong folder (parent directory)


09 Jul 2011   #1

Windows 7 32 and 64 bit
 
 
Windows deletes wrong folder (parent directory)

Hi,
I experience this problem in Windows 7 32bit:
Sometimes when I want to delete a folder, Windows doesnt delete the folder I selected, but the PARENT folder, causing a lot of data loss. I coudn't find anything about this issue on the web.

Today I accidentally removed 4 GB of data in this way! I was able to recreate the problem and make a screenshot of it.

You can see I selected a folder called "buroblad" but windows asks me if I want to delete the parent folder called "pc".

Anyone on how this happens, solutions?



Attached Thumbnails
Windows deletes wrong folder (parent directory)-foute-map-delete-w7-2.jpg  
My System SpecsSystem Spec
.

09 Jul 2011   #2

32bit: XP, Win7 H.P. / 64bit: 2008R2, Win7 Pro, Ultimate / Several flavors of Linux
 
 

You are dealing with different conditions:
  • Item that has focus (an area or item that can have an action completed)
  • State of an item (such as selected/not selected)
  • Visual indicator of an item state (selected) but the item does not have focus

These are NOT the same as focus trumps non-focused state. Requested actions (such as DELETE) are applied to an item that has focus not the non-focus item to which you set the state (selected). To complete the action you wanted, the desired item (subfolder with state = selected) must also have focus.

To make it even more interesting, it is actually the Windows Explorer pane that receives the focus and you set the state (select) of the item within the pane on which you can apply an action (such as DELETE). In Windows Explorer the left navigation pane can have only one item selected but the right list pane can have one or more items selected.

In your example, you must have:

1. Selected (clicked on) the subfolder selection check box (in the right list pane)
  • focus is set to the list pane (right pane) and
  • state (selected) is set to your subfolder and
  • the visual indicator (check mark) shows the selected state
2. Then you moved the cursor to and clicked on the parent folder (in the left navigation pane)
  • this changed the focus and state to the parent folder in the navigation pane
  • however, the state of your previous action remained as selected in the list pane (as shown by the check mark)
3. You then requested the DELETE action
  • the requested DELETE action was applied to the item that has focus (the parent folder in the navigation pane), not to the item which you set the selected state (subfolder in list pane) as it no longer had focus
This behavior is by design. You must remain aware of what has focus not just to an item that has a visual indicator of state but does not have focus. To be safe, always click on the item (to set focus) just before applying an action.


Regards,
GEWB
My System SpecsSystem Spec
11 Jul 2011   #3

Windows 7 32 and 64 bit
 
 

Thanks for your extensive answer GEWB. Theoretically your story might be right, but from the userview this is a major fault from microsoft. Users must be able to count on that the explorer works in the same way as it did in XP for these important functions. To change the behaviour so that some users suddenly loose gigabytes of data is the same as changing the function of ctr-C from copying to the shift-delete function. For experienced users like me, after years of doing these kind of actions they happen so fast that it has become automatic; I don't even look at the confirmationwindow.

I am glad for you that you use the explorer in a way that this doesn't bother you. I searched some more and found a topic on this on the microsoft forum:
It is easy to accidentally delete a parent folder in Windows 7 - Microsoft Answers


One extra comment: you wrote that I had clicked on the parent folder before hitting Delete. This is definitely not the case. I still don't know exactly how I did it, but I know that the last item I click on, will be deleted, left or right pane. This is the same in XP. It has to do with going into a folder to check the content and then moving back to the parent folder (probably with Alt-left arrow) and then hitting delete to delete the selected folder.

KR, Wouter
My System SpecsSystem Spec
.


12 Jul 2011   #4

32bit: XP, Win7 H.P. / 64bit: 2008R2, Win7 Pro, Ultimate / Several flavors of Linux
 
 

Quote   Quote: Originally Posted by oerWouter View Post
For experienced users like me, after years of doing these kind of actions they happen so fast that it has become automatic; I don't even look at the confirmationwindow.
I'm in full agreement with you (don't even get me started on changes to every version of Office).

Quote   Quote: Originally Posted by oerWouter View Post
I am glad for you that you use the explorer in a way that this doesn't bother you.
Actually it DOES bother me. I, too, learned the hard way about this condition when I did a SHIFT-DELETE, didn't fully read the confirmation dialog, and deleted hundreds of files in error. Took over an hour with a recovery utility to get them back.

Quote   Quote: Originally Posted by oerWouter View Post
One extra comment: you wrote that I had clicked on the parent folder before hitting Delete. This is definitely not the case. I still don't know exactly how I did it, but I know that the last item I click on, will be deleted, left or right pane.
As you had not written the exact sequence of events, I tried to reconstruct a scenario to duplicate your result. I'll play with it some more as my time permits.

Regards,
GEWB
My System SpecsSystem Spec
12 Jul 2011   #5

Windows 7 Ultimate x64
 
 

I don't get the problem here...? It's deleting the most recently clicked-on item, right? The item that has focus?
My System SpecsSystem Spec
12 Jul 2011   #6

Windows 7 Ultimate x64 SP1
 
 

The bigger problem is that too few people use SHIFT+DEL instead of just deleting the files to the recycling bin. That's your undo. I've done what the OP has done many times, but could always restore from the recycling bin.
My System SpecsSystem Spec
12 Jul 2011   #7

Windows 7 Home Premium 64 bit
 
 

It's really not a flaw in Win 7, highlite the folder you want to delete, right click the folder and do delete, the box comes up asking you if this is the folder you want to delete, click yes and it's in the recyle bin. Mistake made it's there until you empty the bin.

Edit: DeaconFrost is right Shift Delete is permenant Gone, where rt click delete goes to recycle bin and is retrievable.
My System SpecsSystem Spec
02 Feb 2012   #8

Windows 7 Ultimate SP1 (64 bit), Windows XP SP3, Linux Mint 17 MATE (64 bit)
 
 
Check out the picture

Check out the picture.
The "pc" folder isn't the focussed one (it's grey).
The "buroblad" folder is the focussed one (it's blue).

Windows is offering to delete the non-focussed folder!
On his PC, it seems like the "check box" doesn't actually switch focus, even though the colour scheme indicates that it has!

I've tried on my PC and it works as you would expect (i.e. checking the "check box" swaps the focus).


You may need to open the "Command Prompt" and execute:
sfc /scannow
Tutorial:
SFC /SCANNOW Command - System File Checker
My System SpecsSystem Spec
16 Feb 2012   #9

Windows 7 Home Premium 64 bit
 
 

I am having the same problem as oerWouter, except when Windows confirms my deletion (the box that pops up in the picture that oerWouter posted) the name the window shows is the name of the folder I am intending to delete. The process I am using is open the parent folder, right click on the folder I want to delete, select delete, click OK when Windows confirms. The reason I know that it is deleting the parent folder is because it says "Finding items in [parent folder]" after I hit OK on the window that pops up. I didn't completely follow what the solution was in this forum. Can anyone help me out?
My System SpecsSystem Spec
16 Feb 2012   #10

Windows 7 Home Premium 64 bit
 
 
To add to my previous post...

I am also having problems when I drag the folder directly to the recycling bin. It is ridiculous! I outlined my original problem with pictures:

HOVERING OVER FOLDER (my mouse does not show up, but it is hovering over the folder named "backups" which is the folder I am intending to delete)



RIGHT-CLICKING ON FOLDER (I right-clicked on backups)



CONFIRMING CORRECT FOLDER (It says that I am deleting the folder called "backups"- so far so good...)



DELETING PARENT FOLDER! (but when it starts deleting things, it deletes my whole flashdrive called "boda"! I had to take this picture really quick because I wanted to hit cancel as soon as possible, but I am very sure that it is deleting the flashdrive because the amount of data it is deleting as way more than the folder is.)

My System SpecsSystem Spec
Reply

 Windows deletes wrong folder (parent directory)




Thread Tools




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 05:27 AM.
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