Sometimes, while trying to install an application on your system, you may encounter the “An error occurred while trying to copy a file. The source file is corrupted” error message. It also gives three options: Abort, Retry and Ignore. In most cases, the latter options do not help install the app and the first choice is to cancel the installation.
Usually, as the error message says, the source installer is really corrupted. It can happen due to network issues or if you downloaded the file from unreliable websites. However, the issue can also occur due to storage disk or RAM errors or because of conflicts with the previous software. In this article, we include the solutions you need to use for all cases.
How to Fix An Error Occurred While Trying to Copy a File. The Source File is Corrupted
Here are the possible solutions you can apply whenever you encounter the “An error occurred while trying to copy a file. The source file is corrupted” error on Windows:
Re-download the File
The first thing you should do is to re-download the installer. It is possible that the previous installer was not really complete, which is more probable if you are using torrents.
We recommend using proper channels to download the file instead of peer-to-peer (P2P) connections like torrents. For instance, if you encounter an issue with a video game, try using Steam or any dedicated platform.
Also, if you downloaded an installer earlier, you can try downloading a portable version of the app and use it instead. Keep in mind that you may need to add the folder to your Path variable if you want to use a programming tool or git-bash.
Troubleshoot Network Issues
It is possible that some network issue was responsible for the incomplete download of the source file. So, whenever you encounter this issue, we recommend temporarily disabling your third-party antivirus and firewall if you think the file you want to download is safe.
Additionally, you may also encounter issues while downloading the installer if your hosts file is blocking certain IP or DNS addresses. You need to check the file and comment out all unnecessary lines by adding a hashtag (#) sign at the front to resolve this issue.
Check Storage Disk and Connections
If you were trying to install a program from an external storage drive, it is possible that the connection was disrupted suddenly. If so, your computer can’t find the next necessary file or dependency for installation and assumes the source to be corrupt.
So, we recommend performing the following checks to make sure everything is alright:
- Check if the cable is loose or highly twisted.
- Connect the disk with another PC and check if there are any connection issues.
- Do the same by using another disk or device with your computer.
Apart from connection problems, you may also encounter the error if the disk is corrupted, leading to missing sections of the source installer. You can check for disk sector corruption by running the Disk Checking (CHKDSK) utility. To do so,
- Open Run.
cmdand press Ctrl + Shift + Enter to open the Elevated Command Prompt.
- Enter the command:
chkdsk /r /x C:and follow the prompts.
- If you encounter this issue while trying to download the file in another volume, use its drive letter instead in place of C:
CHKDSK should resolve any logical sector or partition errors. However, if it shows that the disk has errors but fails to resolve them, your disk is likely failing. You need to replace it in such a scenario.
Uninstall App if Previously Installed
If you are trying to install a different version of the app you already have, the files may conflict, leading to this issue. You need to uninstall the previous program and make a clean install to avoid such issues. Here’s how you can do so:
- Open Run.
appwiz.cpland press Enter to open Programs and Features.
- Look for and select the app.
- Click Uninstall or Uninstall/Change and follow the on-screen instructions.
- Then, open Run again.
appdataand press Enter to open the AppData folder.
- Go inside Local and Roaming folders and delete the residual files/folders of the apps you uninstalled.
- The folders usually have the name of the app or its manufacturer, so they are easy to recognize. If you can’t tell which folder you need to remove, you can check official sources for this information.
After that, try running the installer again and see if it works this time.
Check Random Access Memory
If you get this error in all or almost all programs you are attempting to install, it is possible that your RAM has some defects. You can check for such an issue by running the Windows Memory Diagnostic app. To do so,
- Open Run.
mdschedand press Enter to open Windows Memory Diagnostic.
- Click on Restart now and check for problems (recommended).
Your PC now restarts and runs the tests. After that, it restarts again and shows the result message. If it shows any error, your RAM stick or slot is defective. You can try using a single RAM at a time on different slots to narrow down the faulty device.
Then, you should be able to resolve the issue by replacing it. You can seek help from hardware experts if you experience any problems in the process.