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

Some users are encountering the 0x80070052 (The directory or file cannot be created) when attempting to copy files to a removable media like a flash drive or external HDD. In most cases, the issue is reported to occur with photos, videos (particularly those with a name over 20 characters).

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

If you’re using an older File System for your removable drive (like FAT16) the root folder can only support a limited number of files on the root folder. In this case, you can avoid the error entirely by pasting the files in a subfolder. But if you’re using an older system file format, you might consider formatting your drive and moving towards a newer iteration to avoid problems of this kind.

If you’re encountering the issue while attempting to copy encrypted files, it’s most likely because the encryption key cannot be moved alongside the file. To fix this, ensure that the Credential Manager and/or the 3rd party utility you used to encrypt the files are running at the time when you attempt to copy the file/s.

However, in some instances, the 0x80070052 error can also be caused by some type of system file corruption. To fix it, simply run the Error-checking tool and reconnect the media once the process is complete.

Copy the Files in a Subfolder

If you get this error while trying to copy the files on the root folder, you might be able to avoid the issue entirely by copying the files to a different location (from the root folder).

Keep in mind that regardless of the file system that you are using (FAT16, FAT32, NTFS), each one of them has a limitation regarding how many files can the root folder contains. For example, if you’re using FAT16, the root folder can’t contain more than 128 files.

A lot of users that we’re struggling to resolve the 0x80070052 error have confirmed that the issue no longer occurred once they attempted to create a folder on the removable drive (instead of pasting the file directly onto the root folder).

If you think this scenario might apply to your current situation, simply open your removable drive, right-click on space and choose New > Folder. Next, name the newly created folder however you want, then paste the files that you want to copy directly into it (not the root folder)

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

See if you’re still encountering the same 0x80070052 (The directory or file cannot be created) even when copying the files away from the root folder.

In case the same issue is persisting, move down to the next potential fix below.

Format the Drive to FAT32

In most cases, the 0x80070052 (The directory or file cannot be created) error will occur if the file system you’re trying to copy files to is formatted to an older file system that can’t handle files of this magnitude – FAT16 is the most common file system format that is reported to cause this issue.

If you’re not sure what File system you’re using for your external HDD or flash drive, you can find out by right-clicking on your drive letter in File Explorer and choose Properties from the context menu. Inside the Properties screen, select the General tab and check the File system (under Type).

Discovering the File System used for the removable drive

If you discovered that the file system is of an older format (different from FAT32), there’s a high chance that you will be able to fix the issue by formatting the drive to a modern file system like FAT32. Follow the instructions below for instructions on how to do this:

  1. Open File Explorer and identify the removable media that is triggering the 0x80070052 when you attempt to copy files on it. Once you see it, right-click on it and choose Format from the newly appeared context menu.
    Formatting the removable drive

    Note: If you have important files stored on that drive, back them up before initiating a formatting procedure – This operation (even if you go for a Quick Format) will remove any data from the drive).

  2. Inside the Format screen, ensure that the drop-down menu associated with File System is set to FAT32. Next, set the Allocation unit size to 4096 bytes.
    Configuring the formatting utility

    Note: If you had other corruption-related issues with this removable drive, you might need to consider unchecking the box associated with Quick Format. But keep in mind that unless you go for a Quick Format, the operation might end up taking several hours.

  3. Hit Start to launch the operation and wait for the process to complete.
  4. After the operation is finished, attempt to copy the same files that were previously triggering the 0x80070052 error again and see if the issue is now resolved.

In case the same problem is still occurring or this scenario wasn’t applicable, move down to the next potential fix below.

Copy Encrypted Files

If you’re encountering this issue while attempting to move encrypted files, you will need to take additional precautions to ensure that the encryption key is also transferred.

In case you used the built-in encryption method, all you need to do is ensure that the service associated with the Credential Manager is set to Automatic and running at the time when the file copying is taking place.

However, if you encrypted the files externally (with a service like McAfee encryption or a different 3rd party utility), you’ll need to ensure that the program is running when you are copying the encrypted files.

Here’s a generic step-by-step guide that will allow you to copy encrypted files on a flash drive without encountering 0x80070052 (The directory or file cannot be created):

  1. Ensure that the 3rd party program you used to encrypt the files is running.
    Enabling Encryption

    Note: Ignore this step if you’ve only used the built-in Windows encryption.

  2. Press Windows key + R to open up a Run dialog box. When you see the Run box, type ‘service.msc’ inside the text box and press Enter to open up the Services screen.
    Opening services by typing “services.msc” in the RUN command.
  3. Once you’re inside the Service screen, move over to the right-hand section and scroll down through the list of locally installed services until you find the Credential Manager.
  4. After you manage to locate it, right-click on it and choose Properties from the newly appeared context menu.
    Accessing the Properties screen of Credential Manager
  5. Inside the Properties screen of Credential Manager, select the General tab and ensure that the Startup type is set to Automatic. Then, click on the Start button to ensure that the service is currently running and click Apply to save the changes.
    Configuring the Credential Manager
  6. Copy the encrypted files that were previously triggering the 0x80070052 (The directory or file cannot be created).

In case the same issue is persisting, move down to the next potential fix below.

Repair the Drive for Corruption

As it turns out, this particular issue can also occur due to some type of corruption that is forcing the removable storage device to throw this error. In most cases that we looked at, the issue has started occurring after an unexpected machine interruption.

The problem is fairly common with SD cards that are being used on cameras (they work fine there) but throw this error while the user tries to copy the files from the SD card on their computer HDD / SSD.

If this scenario is applicable, be advised that some affected users have managed to fix the issue by triggering a drive repair from the Properties menu.

Here is a quick guide on scanning & repairing the drive from any corruption that might end up causing the 0x80070052 error:

  1. Open File Explorer, right-click on the removable drive that you’re encountering issues with, and choose Properties from the context menu.
    Repairing the drive
  2. Inside the Properties screen, select Tools from the horizontal tab at the top. Then, click on the Check button under Error-checking.
  3. When you’re prompted by the UAC (User Account Control), click Yes to grant administrative access.
  4. Once you get to the next screen, click on Scan and repair drive and wait for the process to complete.
    Scanning and Repairing removable drive
  5. After the operation is complete, remove & reinsert the removable drive, then see if the issue is resolved when you attempt to copy the files again.
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.