How to Fix Error Code: 0x80070052 While Copying Files?

Copying files to a USB drive or SD card may suddenly fail with error code 0x80070052, stopping the transfer without warning. The error means “The directory or file cannot be created” typically caused by file system limitations. FAT32, the default format for many removable drives, has a strict cap on how many files or folders can exist in the root directory—once that limit is hit, new files can’t be created there.

0x80070052 – The directory or file cannot be created error message

This error often occurs even when there’s plenty of free space on the drive, confusing users unfamiliar with FAT32’s structure. Drives used in media players, cameras, and older systems can also cause this error due to their default formatting.

In this article, we will discuss different ways to solve this error.

1. Copy the Files to a Subfolder

If you see this error when copying files to the root folder of your drive, you can often bypass the problem by copying the files into a folder inside the drive instead. Every file system (FAT16, FAT32, NTFS, etc.) has a limit to how many files can be placed in the root directory. For example, with FAT16, the root directory can’t have more than 128 files.

Many users who struggled with the 0x80070052 error found that creating a new folder and copying the files there (instead of directly to the root) resolved the problem.

If you think this might help in your situation, open your removable drive, right-click on some empty space, and select New > Folder. Name the folder as you wish, and then paste your files into this new folder instead of the root directory.

Creating a folder to copy the files away from the root folder

Check if you still encounter the 0x80070052 (The directory or file cannot be created) error when copying files into the new folder.

2. Format the Drive to FAT32

Most of the time, the 0x80070052 (The directory or file cannot be created) error happens if your removable drive uses an old file system, such as FAT16, that can’t handle a high number of files or larger file sizes.

If you’re not sure which file system your external drive uses, you can check by right-clicking on the drive in File Explorer and selecting Properties. In the Properties window, look under the General tab for File system.

Discovering the File System used for the removable drive

If the drive is using an outdated file system like FAT16, or a non-compatible one, reformatting to FAT32 (or NTFS/exFAT if supported) can help.

  1. Open File Explorer, find your removable drive, right-click on it, and select Format from the menu.
    Formatting the removable drive

    Note: Formatting will delete everything currently on the drive, so make sure to back up any important files before continuing.

  2. In the Format window, select FAT32 as the file system, and set Allocation unit size to 4096 bytes.
    Configuring the formatting utility

    Note: If you’re experiencing drive errors, uncheck Quick Format for a deeper scan. This may take longer than a quick format.

  3. Click Start to begin the formatting process and wait until it’s complete.
  4. Once the formatting is finished, try copying your files to see if the problem is resolved.

3. Copy Encrypted Files

If you’re having this issue while transferring encrypted files, there are a few extra things to consider to ensure the encryption key is also available. If you used Windows’ built-in file encryption, just make sure the Credential Manager service is set to Automatic and actively running while you copy the files.

If you used external encryption software (like McAfee or any other third-party tool), make sure that program is open and running before you attempt to copy the encrypted files.

  1. If you used third-party encryption software, make sure it’s running now.
    Enabling Encryption

    Note: You can skip this step if you only used Windows built-in encryption.

  2. Press Windows key + R to open the Run box. In the box, type ‘services.msc’ and press Enter to open the Services window.
    Opening services by typing “services.msc” in the RUN command.
  3. Look for Credential Manager in the list of services on the right side.
  4. Right-click on Credential Manager and choose Properties.
    Accessing the Properties screen of Credential Manager
  5. In the Properties window, under the General tab, set Startup type to Automatic, then click Start (if it’s not already running) and press Apply to save the changes.
    Configuring the Credential Manager
  6. Try copying the encrypted files that were causing the error before.

4. Repair the Drive for Corruption

Sometimes, this error shows up because there is corruption on your removable device—this is especially common after unexpected problems like removing the drive while it’s in use or a sudden power loss. SD cards used in cameras can also develop this issue: they work properly in the camera, but give errors when transferring files to your computer.

  1. Open File Explorer. Right-click on your removable drive and select Properties.
    Repairing the drive
  2. Go to the Tools tab at the top, then click Check under Error-checking.
  3. If you’re asked by UAC (User Account Control), click Yes to allow it.
  4. Then, click Scan and repair drive and wait for the scan to finish.
    Scanning and Repairing removable drive
  5. Once done, remove and reconnect your removable drive, then try copying your files again to see if the issue is fixed.
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.