Home » Guides » Fix: "An error occurred while trying to copy a file: The Source File is Corrupted" Error (2023)

How to fix “An error occurred while trying to copy a file, The source file is corrupted” (2023)

Here are some tips and tricks to fix the "An error occurred while trying to copy a file, the source file is corrupted" error message.

If you are trying to install a program or copy a file on your Windows desktop, you might encounter “An error occurred while trying to copy a file: The source file is corrupted” error message. Corrupted host files or faulty disk drives are some of the few reasons for this error to happen. However, you can fix this error and install a program or copy a file on your Windows desktop by following the steps given in this guide below.

Fix: “The Source File is Corrupted” Error on Windows (2023)

Fix: The Source File is corrupted" error

The error message “An error occurred while trying to copy a file: the source file is corrupted” can occur due to a corrupted host file, faulty disk drive, or insufficient space in the disk drive. You can fix these issues, by running CHKDSK, editing host files, and more as mentioned in the steps below:

1. Reset the Host file

Due to the modified host file, the error message “the source file is corrupted” might appear. In such cases, you might need to reset the host file, and you can do this by following these steps:

  • First, open Notepad as administrator from the Start menu Search box.
  • On the Notepad window, click on File from the menu bar on top.
  • Now click the ‘Open’ option from the file menu and navigate to ‘C’ drive > Windows > System32 > drivers > etc folder.
  • Select the ‘hosts’ file and click the Open button.
  • Then remove all the content in the host file and type in the following text:

127.0.0.1 localhost

  • Now, restart your Windows desktop to fix the issue.

2. Run CHKDSK

If your disk drive has a bad sector, it can cause the “Source file is corrupted” error message to trigger. You can fix this issue with the help of the in-built CHKDSK utility on your Windows desktop and this is how you can do it:

  • Open the Command Prompt as administrator from the Start menu Search box and type in the following command:

chkdsk X: /f /r

  • Make sure to replace ‘X’  with your system drive letter which is causing the issues in the above command.
  • Then press the ‘Enter’ key on your keyboard.
  • Restart your PC and try copying the file to the repaired disk drive to fix the issue.

3. Other Methods

When the “source file is corrupted” error message appears while trying to install a program, it can happen due to the restrictions by the installed firewalls or antivirus software. In such cases, you might need to disable the firewall and antivirus software to install a program.

  • Also, an unstable internet connection can cause the error message to trigger. Hence, during the installation of a program, make sure you have a stable internet connection.
  • Check if your disk drive has enough space before installing a program or copying a file.
  • If none of the above methods works, delete the file and reinstall the program on your Windows desktop to fix the issue.

That’s everything covered on how to fix the error “An error occurred while trying to copy a file, The source file is corrupted” on your Windows PC. Also, check out our other guides, such as How to fix the “no such interface is supported” error or How to fix the “IMM32.dll is missing” error on Windows.