Windows deletes wrong folder (parent directory)

Page 1 of 2 12 LastLast

  1. Posts : 2
    Windows 7 32 and 64 bit
       #1

    Windows deletes wrong folder (parent directory)


    Hi,
    I experience this problem in W7 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 Attached Thumbnails Windows deletes wrong folder (parent directory)-foute-map-delete-w7-2.jpg  
      My Computer


  2. Posts : 1,030
    Linux Mint / XP / Win7 Home, Pro, Ultimate / Win8.1 / Win10
       #2

    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 Computer


  3. Posts : 2
    Windows 7 32 and 64 bit
    Thread Starter
       #3

    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
    Last edited by Brink; 11 Jul 2011 at 04:31. Reason: merged
      My Computer


  4. Posts : 1,030
    Linux Mint / XP / Win7 Home, Pro, Ultimate / Win8.1 / Win10
       #4

    oerWouter said:
    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).

    oerWouter said:
    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.

    oerWouter said:
    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 Computer


  5. Posts : 370
    Windows 7 Ultimate x64
       #5

    I don't get the problem here...? It's deleting the most recently clicked-on item, right? The item that has focus?
      My Computer


  6. Posts : 5,795
    Windows 7 Ultimate x64 SP1
       #6

    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 Computer


  7. Posts : 1,114
    Windows 7 Home Premium 64 bit
       #7

    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 Computer


  8. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
       #8

    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
    Last edited by lehnerus2000; 02 Feb 2012 at 00:33. Reason: Link Added
      My Computer


  9. Posts : 2
    Windows 7 Home Premium 64 bit
       #9

    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 Computer


  10. Posts : 2
    Windows 7 Home Premium 64 bit
       #10

    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.)

    Last edited by Emily Boda; 16 Feb 2012 at 20:47.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 02:59.
Find Us