18

This happens to me in Windows Explorer: I mean to open a folder and manage to move the mouse and accidentally drag the whole folder ... somewhere. Usually I notice, but not always (in which case I know I'm out of luck). If I notice that it has been dropped into another folder, but don't know exactly where, is there anyway to undo what I just did?

I don't always even notice the folder being grabbed, which makes it more interesting to find where it was dropped. I just noticed that something happened, and I'd like to undo it, because I suspect that one folder was dropped into another.

Josh Kelley
  • 1,615

7 Answers7

22

Short Answer

To undo a file/folder operation in Windows, you can use either the Undo command in the Edit menu, or press Ctrl+Z.

Caveat

NB: There are a few things to note however. While the undo command usually undoes the last file operation, it will not always be the operation you are expecting. Sometimes the last operation does not make it into the undo buffer, making it undo a different operation from what you were expecting. For example, if there are multiple file operations happening at the same time, they are added to the undo buffer in they order that they complete, not the order in which they were initiated. Also, some operations cannot be undone like permanent deletions, those from the command-line, etc.

Recommendation

Instead of using Ctrl+Z, it is safer to use the menu command because you can see what operation Windows will undo before performing it. (Granted, you can redo the operation with Ctrl+Y, but it is easier and safer to just confirm before undoing.) Enable the status bar (View->Status bar), then when you hover the cursor over the Undo command, it will display the operation to be undone.


Screenshot of Windows Explorer with undo command results shown in status bar

Synetech
  • 69,547
7

Edit > Undo Move or Ctrl+Z. You may have to press Alt first, if the menu bar is not visible.

undo

iglvzx
  • 23,818
5

Ctrl+Z will undo the drag and drop operation. Choosing Undo from the Edit menu works as well.

obsd
  • 719
3

To undo the last action, choose Undo from the Edit menu or hitCtrl+Z on your keyboard.

Raystafarian
  • 21,963
  • 12
  • 64
  • 91
goblinbox
  • 2,426
0

2 ways:

1. Quick Access Toolbar

In Windows 10 this is now accessible from the "Quick Access Toolbar":

Quick access toolbar

You just select "Undo" from that menu, then you can click the back-arrow button as many times as you need to undo file move operations etc.

2. Context Menu

You can also right-click on any blank space within Windows Explorer and select the Undo move operation from the Context Menu:

Windows Explorer undo op via context menu

bobobobo
  • 5,460
0

Middle-click or right-click before dropping it to cancel the action entirely. Middle-click is probably more preferable since it won't summon a context menu. This way you can avoid all the caveats of undoing an accidental drag 'n drop.

arkon
  • 198
  • 1
  • 7
0

To add on existing answers:

I sometimes do accidental moves, like so: I'm pretty sure I just made a wrong move, but I don't know what I moved.

When it happens, I usually hover on "Edit > Undo Move" and look at the status bar to know the moved file/folder. I read something like Undo Move of 'foobar.txt'. Nice.

But when it happens with several items, I'm getting the text Undo Move of ''. Super useful…

This experience on Windows 7. If I recall correctly, Windows XP was showing something like "file 1.txt, file 2.txt…"


So, as a tedious workaround, here is what I (have to) do:

  • Run NirSoft FolderChangesView (great software, as usual)
  • Start monitoring of the drives I was working on.
  • In Explorer, undo the move. Cross fingers.
  • Look at the report in FolderChangesView.
  • Now with a bit of luck, I know what was the move.
  • Take action accordingly: keep the undoing of the move, or redo the move.
Gras Double
  • 1,140
  • 1
  • 14
  • 21