Wednesday, March 29, 2023
HomeWINDOWSAn error occurred while trying to copy a file on Windows PC

An error occurred while trying to copy a file on Windows PC


Some Windows users received An error occurred while trying to copy a file message while trying to copy a file. It may happen that the space of the drive in which you are copying the file is not enough, or there is some issue with the host file. In this post, we will discuss the issue and see what you can do to resolve the issue.

An error occurred while trying to copy a file: The source file is corrupted.

An error occurred while trying to copy a file on Windows PC

What does error copying file or folder mean?

When you install an application it saves some of its files at a particular location, either default or custom. If there is some issue in the installation process, such as OS failing to map the IP to the host or corrupted disk files, the copying process will fail miserably. In both cases, we can resolve the issue using some simple solutions mentioned after this.

Fix An error occurred while trying to copy a file on Windows PC

When installing or updating an app, our computer copies many files from the source path to the destination. If your computer cannot map the address of the app that is updating or installing because of a corrupted host file or disk, such an error message can appear. You have to follow the steps mentioned below to resolve the issue:

  1. Re-download the file
  2. Check if the disk has enough space
  3. Temporary disable antivirus and firewall
  4. Check the connection
  5. Run CHKDSK
  6. Edit the Host File
  7. Delete the Host File

Let’s get started.

1] Re-download the file

Since it is mentioned that the source file may be corrupted, we suggest you re-download the source or setup file again, preferably to a different location, and then try to carry out the operation.

2] Check if the disk has enough space

Before troubleshooting the issue, you should know if the disk you want to store the file in has enough space or not. This is applicable not just for copying files but also if you get an error when installing the app. To do the same, just open File Explorer and check the storage. In case the drive is full, either change the installation location or delete some files from there.

3] Temporary disable antivirus and firewall

Your antivirus and firewall are responsible for the incomplete download of the source file. Sometimes this problem comes due to its interference as they think the file the installation media is copying is malicious. So, whenever you face this issue, temporarily disable your third-party antivirus and/or firewall and see if that helps you to resolve this issue. However, enable the security program after installing the desired app.

4] Check the connection

There’s a high chance that the program’s installation process from an external storage device may get disrupted due to various reasons. And in such cases, the computer detects such programs as corrupted as it will not be able to find the necessary files/dependency for installation. Therefore to avoid such mishaps, make sure that the cable is tight and not loose or twisted at all.


Run the Check Disk utility to scan and repair the disk files. Follow the steps mentioned below to do the same.

  • Press the start key and type Command Prompt in the search bar and select Run as administrator.
  • Click on Yes when prompted by UAC
  • Enter the following Command in the command prompt.
chkdsk /r /x C:
  • If you encounter this issue while trying to download the file in another drive, then change its drive letter instead in place of C:

Hopefully, after running the check disk the issue will be resolved.

6] Reset the Host File

When installing an application, our OS needs to map the IP and domain. This task is accomplished using the Host File present on all of our computers. In case, there is some misconfiguration in the Host file, the mapping process will fail and you won’t be able to install any applications. In that case, we need to reset the Host File  to default to make the mapping process feasible. Follow the steps given below to do the same.

  • Press the Windows button, type Notepad, and select Run as administrator.
  • Click on Yes when asked
  • Then click on File and select Open.
  • Go to the C drive > Windows > System32 > drivers > etc.
  • Here locate the Host file in an etc folder and open it.
  • Remove all content present in the Host file, copy-paste the text given below in it, and save the file. localhost
  • Finally, restart the computer and try installing the software again.

Alternatively, if you wish you can download the default Hosts file of Windows 11/10 by clicking here. Extract the contents and place the Hosts file in your C:\Windows\System32\drivers\etc folder. You may be asked for permission to replace it.

See if this resolves the issue now.

Also read: Error Copying File or Folder, Catastrophic failure

When launching a downloaded file, your computer says that the file format is incorrect if it doesn’t have the app required for that kind of file. This mostly happens when launching a RAR file. In that case, you can check how to open the RAR file. If you already have the required tool, or if the file is not RAR, check our guide on what to do if we get an unknown format error. Hopefully, you will be able to resolve the issue without any issues.

Read: Unspecified error when copying a file or folder in Windows.

An error occurred while trying to copy a file on Windows PC

Source link


Please enter your comment!
Please enter your name here

Most Popular