How to fix ERROR_USER_MAPPED_FILE (1224)
Description
The requested operation cannot be performed on a file with a user-mapped section open. This error occurs when TeraCopy tries to overwrite, truncate, or replace a destination file that another program currently has mapped into memory. Windows does not allow the size or contents of a memory-mapped file to be replaced while the mapping is active.
Causes
- File is in use by another application — the destination file is an executable, DLL, database, or document currently loaded by a running program.
- Antivirus or indexing — security software or Windows Search maps the file into memory while scanning or indexing it.
- Development tools — Visual Studio, build tools, or debuggers keep compiled files mapped while a project is open or running.
- Network share users — on a file server, another user has the file open from the share (for example, running an application directly from it).
- Backup or sync software — tools that read the file at the same moment it is being overwritten.
Solutions
-
Close the program using the file — close any application that may have the destination file open, then retry. For executables and DLLs, make sure the program is not running.
-
Find the locking process — use Resource Monitor (
resmon.exe→ CPU tab → Associated Handles) and search for the file name to see which process is using it. -
Retry after a moment — if the file is being scanned or indexed, waiting a few seconds and retrying is often enough.
-
Exclude the destination from scanning — add the destination folder to your antivirus exclusions, or exclude it from Windows Search indexing.
-
Ask other users to close the file — on network shares, ask users who have the file open to close it, or use Computer Management → Shared Folders → Open Files on the server to see who is using it.
-
Restart the computer — if you cannot find the program holding the file, restarting releases all mappings.