How to Undo a File Move on a Mac (and Find a File You Moved by Mistake)
Quick answer: Press ⌘Z in Finder right after the move to undo it. If that is too late, find the file with the Recents view or Spotlight, or look in the Trash and choose Put Back. If nothing works, restore it from Time Machine.
Moving files by mistake is easy because a move across folders gives no warning. Here is how to get a file back, in order.
Ways to get it back
| Situation | Fix |
|---|---|
| You just moved it | Press ⌘Z |
| You do not know where it went | Recents or Spotlight search |
| You deleted it | Trash, then Put Back |
| It is gone from everywhere | Restore from Time Machine |
1. Undo immediately
In Finder, choose Edit ▸ Undo Move or press ⌘Z. It undoes the last file operation, and you can press it more than once.
2. Find where it went
Click Recents in the Finder sidebar to see recently opened and modified files.
Press ⌘Space, type the file name and look at the path.
In a Finder window, press ⌘F, search for the name, and use the Kind or Last Modified filter.
3. Check the Trash
If you deleted instead of moved, open the Trash, select the file and choose File ▸ Put Back (or press ⌘Delete). It returns to its original location.
4. Restore from Time Machine
Open the folder where the file used to be, open Time Machine, scroll back to a time before the move, and restore it.
Confirm you found the right file
Before you restore or move anything, check that it is the right one. Select the file and press Space to preview it with Quick Look, or ⌘I to open Get Info, which shows where the file is stored and when it was modified. To see the full folder path of a Finder window, press ⌥⌘P to show the path bar.
Search smarter
When you press ⌘F in a Finder window, you can sort the results by Date Modified. A file you moved by mistake keeps its modification date, so searching by the time you last worked on it usually finds it quickly. If you remember part of the name, type it and let Finder narrow the list.
Stop a repeat
The easiest accident to avoid is dragging a file onto the wrong folder when windows overlap. Put both folders side by side in separate windows, or use tabs, and use the keyboard route of ⌘C then Option+⌘V so the move only happens when you press the second shortcut.
Prevent it next time
Move with a clear two-step flow: ⌘C, then Option+⌘V. See Cut and Paste on a Mac: Every Method for Text, Files and Folders.
Use Finder tabs, so you can see both folders. See How to Use File Cut Paste App to Cut and Paste Files, Folders and Images on Mac.
Keep Time Machine on.
How long undo keeps working
⌘Z in Finder reverses recent actions in the current session, and you can press it repeatedly to step back. That history is usually gone after Finder is relaunched or you log out or restart, so if you spot a mistake later, go straight to searching, the Trash or Time Machine instead.
If the file was in iCloud Drive
Files you delete from iCloud Drive can often be recovered for a limited time. On iCloud.com, open Drive and look for Recently Deleted. Files there are kept for about 30 days. This helps when the file is no longer on the Mac and Time Machine does not have it.
After you find it
Put the file somewhere obvious straight away, rather than leaving it in a temporary spot. If you now have two copies, compare the modified dates in Get Info (⌘I) before you delete either one, so you keep the newer version.
FAQs
Can I undo a drag and drop on a Mac?
Yes, with ⌘Z straight away.
How do I find a file I moved?
Try Recents or Spotlight.
Does a move delete the original?
Only after the copy is complete. See Move vs Copy on a Mac: What Happens With External Drives, USB Sticks and Network Shares.
How do I see where a file is stored?
Select it and press Command+I for Get Info, which shows its location. Or press Option+Command+P to show the path bar in a Finder window.
Does a moved file keep its modification date?
Yes. A move does not change the date the file was last modified, which makes searching by date a quick way to find it.
Can I undo a file move after restarting my Mac?
Usually not with ⌘Z, because Finder's undo history does not survive a restart. Use Spotlight, the Trash or Time Machine to get the file back.