How to fix ERROR_USER_MAPPED_FILE (1224)

Code:1224 (0x4C8)

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

  1. 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.

  2. 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.

  3. Retry after a moment — if the file is being scanned or indexed, waiting a few seconds and retrying is often enough.

  4. Exclude the destination from scanning — add the destination folder to your antivirus exclusions, or exclude it from Windows Search indexing.

  5. 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.

  6. Restart the computer — if you cannot find the program holding the file, restarting releases all mappings.