How to Fix Error 0x80070002 When Copying Files
Error 0x80070002 means Windows lost track of a file mid-copy. Locate the file it names, clear OneDrive placeholders and over-long paths, then finish the job with robocopy and repair the drive if it keeps coming back.
-
1. Read the Dialog Before You Dismiss It
The copy dialog names the item it could not find, either in the title bar or after you expand it. Write that name down. Everything else in this fix depends on knowing whether the missing item is one file, one folder, or everything after a…
-
2. Check the Source Folder for That File
Open the source folder and look for the exact name from the dialog. A file that was renamed, moved, or deleted after the copy started still sits in the queue, and Windows stops when it reaches the ghost. If the name has a trailing space…
-
3. Look for OneDrive Placeholders
If the source sits inside a OneDrive folder, check the Status column. A cloud icon means the file is online-only: a placeholder you can see but Windows cannot copy. Right-click the folder, choose `Always keep on this device`, and wait for…
-
4. Measure the Path Length
Right-click the deepest folder in the failing path and count characters, or paste the path into a text editor. Over 260 characters and Explorer's copy engine gives up with 0x80070002 even though the files exist. Shorten folder names near…
-
5. Search for the File by Name
Still cannot find it? Open a terminal and search the whole drive: `where /r D:\ filename.docx`, or in PowerShell `Get-ChildItem D:\ -Recurse -Filter filename.docx -ErrorAction SilentlyContinue`. If the search finds it somewhere…
-
6. Tell the Dialog to Skip and Continue
If the missing file is one you no longer need, tick `Do this for all current items` and choose Skip. The copy continues with everything else. When it finishes, compare the destination folder against the source — the log of what was…
-
7. Copy With Robocopy Instead of Drag-and-Drop
Open Terminal or Command Prompt and run `robocopy "D:\Source" "E:\Backup" /E /Z /R:2 /W:5 /XJ`. `/E` includes all subfolders, `/Z` makes each file restartable, `/R:2 /W:5` retries a locked file twice instead of aborting, and `/XJ` skips…
-
8. Read the Robocopy Summary
When robocopy finishes, the table at the bottom shows a Skipped column. Anything listed there is your missing item. Cross-reference it against the source folder. If the skipped path is deeper than 260 characters, you have confirmed the…
-
9. Enable Long Paths if You Need Them in Explorer
To make Explorer itself tolerate deep paths, run Registry Editor and set `LongPathsEnabled` to `1` under `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem`, then restart. Apps still have to opt in through their manifests, so…
-
10. Zip the Folder and Copy the Archive
For a folder full of small files that keeps failing at random items, right-click it, choose `Send to > Compressed (zipped) folder`, and copy the single archive instead. One file means one handle, no per-file queue, and no way for a ghost…
-
11. Run chkdsk on the Source Drive
If 0x80070002 keeps returning with different file names, the source drive's file table is losing entries. Open an elevated terminal and run `chkdsk D: /f /r` — replace `D:` with the source drive letter. `/f` repairs the table, `/r` scans…
-
12. Repair Windows Itself With SFC and DISM
When the error also shows up in Windows Update or app installs, system files are involved. Run, in order: `sfc /scannow`, then `DISM /Online /Cleanup-Image /RestoreHealth`, then `sfc /scannow` again. SFC repairs against the local…
-
13. Check Whether the Drive Letter Changed
External drives get a new letter every time the port assignment shifts. If your copy came from a shortcut or a script pointing at `E:\` and the drive now mounts as `F:\`, every queued path is a file not found. Open Disk Management,…
-
14. Pause Real-Time Antivirus Scanning
A real-time scanner that quarantines a file mid-queue produces exactly this error: the file existed when the copy started and does not exist three seconds later. In Windows Security, go to `Virus & threat protection > Manage settings` and…
-
15. Restart Explorer and Reconnect the Drives
Explorer caches folder contents, and a stale cache queues files that are already gone. Press `Ctrl+Shift+Esc`, find Windows Explorer, and choose Restart. Unplug the external drive, plug it into a different USB port directly on the PC —…