November 12th, 2004

Will dragging a file result in a move or a copy?

Some people are confused by the seemingly random behavior when you drag a file. Do you get a move or a copy?

And you’re right to be confused because it’s not obvious until you learn the secret. Mind you, this secret hasn’t changed since 1989, but an old secret is still a secret just the same. (Worse: An old secret is a compatibility constraint.)

  • If Ctrl+Shift are held down, then the operation creates a shortcut.
  • If Shift is held down, then the operation is a move.
  • If Ctrl is held down, then the operation is a copy.
  • If no modifiers are held down and the source and destination are on the same drive, then the operation is a move.
  • If no modifiers are held down and the source and destination are on different drives, then the operation is a copy.

This is one of the few places where the fact that there are things called “drives” makes itself known to the end user in a significant way.

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.