Helping people with computers... one answer at a time.

Accidentally dropping a file where you didn't intend to is easy in Windows Explorer. I'll look at how to recover it and why the error is so darned quick.

On three or four occasions, I have jerked my hand when I am trying to open or move a file and the file disappears. I don't understand how I moved that file 20x faster than if I had tried to copy it.

Well, moving and copying may seem similar in some ways, but as you can see from the results, they are really two completely different things.

Except when they're not. (I know, I know - but everything has its exceptions).

I'll explain the differences.

And I'll show you the quick and easy way to recover from accidental moves.

The accidental move

We've probably all done it at one point or another: in Windows Explorer, click a file, hold the mouse button down, and drag the file's icon to a new location where we release the mouse button to move the file there.

“Windows Explorer has an 'Undo', and in many cases it'll undo that accidental move just as quickly as it happened.”

Except that somewhere along the way, we accidentally release the mouse button and all of a sudden - *poof* - the file is moved ... somewhere. Wherever the mouse pointer happened to be when we unintentionally released it.

Type CTRL+Z.

Or type the ALT key, click the Edit menu and click Undo, if it's not grayed out.

Windows Explorer has an "Undo", and in many cases, it'll undo that accidental move just as quickly as it happened.

Moving a file (single drive)

A move, as its name implies, moves a file from one location to another.

If you drag and drop a file to another location on the same disk drive the default action is to move the file.

When moving to a new location on the same drive, the file's data doesn't actually have to be moved. In this case, a move operation is simply a change to the drive's directory or file listing.

  • The directory of the target folder is updated to include the file being moved in.

  • The directory of the folder where the file used to reside is updated to no longer list the file.

That's it. And because the actual contents of the file are never touched, it's pretty quick.

Now, that only applies to a file being moved to a new location on the same drive. When we're moving across drives, things get slightly more complicated.

But first, we need to understand how Copy works.

Copying a file

If you drag and CTRL+drop (hold the CTRL key while dropping) a file to another location, the action is to copy the file. A true copy copies the contents of the file.

  • The file contents are copied, in full, to some location on the target disk drive. Depending on the size of the file, this can take some time.

  • The directory of the target folder is updated to include the new file copied.

That's it. You start with one file and you end up with two identical copies.

Moving a file across drives

If you drag and drop a file on one drive to another, the default action is to copy the file, as I've just described. If you hold down the SHIFT key when dropping, however, the file will be moved. When moving a file from one drive to another - say from C: to D: - elements of both move and copy are involved.

  • The file contents are copied in full to some location on the target disk drive.

  • The directory of the target folder on the target drive is updated to include the new file copied.

  • The directory of the source folder where the file used to reside is updated to no longer list the file. This causes the actual data for that file on the source drive to be released and marked as unused space.

While both are technically "move" operations, a move from one location to another on the same drive will typically be nearly instantaneous, whereas a move from one drive to another will take noticeable time because it actually has to copy the file contents from one drive to another.

Article C4949 - October 8, 2011 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

15 Comments
Fred Wortham
October 9, 2011 8:44 PM

You can also "right-click-and-drag" to move and copy files in Windows Explorer; when you then "drop" on the target folder or drive, a shortcut menu appears, with the choices being 'Move Here', 'Copy Here', 'Create Shortcuts Here' and 'Cancel' (I also have '7-Zip' as one of my choices). Easyfix!

Obiwan Computerguy
October 11, 2011 9:24 AM

Leo, at the risk of confusing less-experienced readers, I think it would not hurt to clarify the statement "If you drag and drop a file to another location on the same disk drive the default action is to move the file" as printed above to read "on the same PARTITION of the same disk drive", since some of us actually still partition our drives.

Fair enough. But many users don't know (or care) what a partition is, much less know whether or not they have them. But you're correct, I could'a been more correct.
Leo
13-Oct-2011
Nils Torben
October 11, 2011 12:06 PM

If you drag an object (file or folder) to the start button Windows XP creates a shortcut to the object in the startmenu.

Luke Butterfield
October 11, 2011 12:56 PM

I don't know if its the safest way, but I use (control + X) to move my files from one folder to another. Sometimes from my internal HD to my External.

Chris Knee
October 11, 2011 9:17 PM

In Win7, how do I search within files from Explorer like I could do in WinXP?

Ron Barker
October 12, 2011 2:23 AM

If you click on the Advanced button in Indexing Options (Type Indexing Options in seach box) and go to the File Types tab, you will get a list of file types and the way they are indexed. For the file types you want, you can specify that you want the file contents indexed, and not just the file properties.

billzfantazy
October 12, 2011 9:31 AM

Surely its best to right click & drag, then you get a choice of actions (move or copy)

Glenn P.
October 14, 2011 10:50 PM

A "move-file" (so-called!) from one drive to another is really (and of necessity) a "copy-&-delete" operation, and not a "move" operation at all. That  is the reason it takes so long.

Desmond
October 17, 2011 6:53 AM

Hi Leo,~~Because I have XP home & use Mozilla Firefox , along with Incredimail, some of the suggestions You have posted to recover accidently "poof" disappearing Email text saved in Drafts may not apply because Mozilla does not have the Internet Explorer feature>"UNDO"-Can You advise Me Please ?--Regards, Des

This article is about Windows Explorer, the Windows file and folder viewing utility, not Internet Explorer, the web browser. You can try clicking in the edit box and typing CTRL+Z, but ultimately whether your email service provides an undo in their interface is kinda up to them.

Leo
17-Oct-2011
Ed Vance
October 19, 2011 8:32 PM

I normally don't use Drag & Drop in Windows Explorer (WE) in Windows XP.
BUT
I have accidently misplaced File(s)/Folder(s) while moving them some place else with my mouse in WE because my finger slipped off the button.

I used to use the Right-Click method to Copy or Move file(s) in WE that Fred W. described in the Comments section.
And I liked the pop up box asking me what I wanted to do with the selected file(s).

Now I (ususally) will Left-Click on a file I want to Copy or Move, and if I want additional files (or folders) transferred during the operation I will hold down either the CTRL key or the Shift key to select other file(s) while still using the Left Mouse Button to click on them.

After all the files are highlighted that I want to Transfer, I Left-Click on the Edit button on the Menu Bar that's just under the Title Bar.

A drop down box has Options for ---
Copy to Folder... Move to Folder... in it,
so I Left-Click on the one that I want to do.

A window opens up and I can select the Folder (Directory) where I want the things that I highlighted to go into, and click the Copy button (Move button) to get the job done.

That way I KNOW where the transfer went to.

There are two additional benefits to doing it this way.

1. At the bottom of the window there is a Cancel button if You decide NOT to do it.

2. You can Create a new Folder on the drive if You want (need) to, by Left-Clicking a button to do that.

K. Poole
November 29, 2011 5:45 AM

If you do accidentally move files (such as slipping finger) you can undo that move .
I have XP and on top of folder it says file , edit , etc... Click on edit and undo move. You can sometimes go back several steps if needed.

Sam77
December 17, 2011 10:26 PM

AAAhhh...CTRL+Z...that most blessed of keystrokes. Whoever invented it deserves the Nobel Peace Prize much more than any recipient in my lifetime!!!

Oh, and for Obiwan...Partition or no partition - I'm pretty sure the defaults in Leo's article are the same for ANY drive letter.

Don
January 13, 2012 7:35 AM

Edit-Undo is greyed out, CntlZ doesn't work, how to get it back please?
I have sent about 10 hours on the web on this.

That typically means that there is nothing to be un-done, or that the action you just took is not an undo-able action.
Leo
13-Jan-2012
Don
January 13, 2012 3:31 PM

Thanks for the reply Leo :) :) :)
It is ALWAYS like this, never ever gives the option after moving something within the directory of folders.
Is broken.....how to fix.

Bob
March 13, 2012 7:48 PM

Thank you, thank you. I did this (and have done it many times before) with a folder, however it was in the *Open* dialog box of a program, so *Undo* was not available. The folder had many projects on it with many subfolders, so Copying it back was taking 2 hours, and ultimately had an error and didn't even work. Dragging it back took 3 seconds!

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to http://askleo.com/ask to ask your question.