From time to time, when you are trying to update a game from Steam, you might get an error message. The window that pops up will state that the content file is locked and show you the location of the said file.
This error indicates that Steam has been unable to update date on files on your hard drive. And, there are multiple ways to fix this issue. Of course, uninstalling Steam and deleting all local game content, and then reinstalling them both would work perfectly. Of course, this is a fix that will help almost everyone. However, it is less than perfect. It is very time consuming and will use up a lot of data. So, you could probably benefit from attempting several, simpler fixes before resorting to final solutions.
Fix #1: Check your Antivirus
Having an antivirus cause an issue is not a rare occurrence. In a lot of situations, it might be the root of the problem. Sometimes, your antivirus can mark files necessary for Steam as malware. And, of course, in order to resolve the antivirus issue, you will have to use different methods according to the antivirus you are using.
With McAfee, you have no options to exclude files from McAfee scans. Unfortunately, you can only deal with that by turning it off entirely. Once you disable the McAfee program, you can update the game. In order to accomplish this, start McAfee and go to Virus and Spyware protection. Once you do, go to “Real-Time Scanning” and disable it. From there, you should verify the games files’ integrity.
In order to do so follow this guide:
The first thing you have to do is restart your PC and go to Steam. Open the library and locate the game that is the cause of the issue. Use right click on it and go to properties – local files. Now that you are there, you can simply order it to verify the integrity of game cache. It might take a few moments.
Usually, this will solve this problem.
This antivirus is rather quick to quarantine application files. It frequently marks them as malicious. This can frequently leads to “Content File Locked” error during the update. Go to your steam director, select the location address and copy it. By default it should be in Program Files, however, a lot of people use different locations. Copy the said address and go back to ESET NOD32. Go to exclude from real-time option and paste the location. Then follow the method above to verify the in game files’ integrity and you should be good to go.
As previously mentioned, Steam being flagged as an unwanted program might prevent it from making any alterations to your hard disk. And Kaspersky can sometimes do that. In order to solve this problem, you can go to the “threads and exclusions”. From there, go to “trusted zone” and simply add a new application to the list – steam.exe. Just don’t forget to also alter the parameters to stop restricting application activity or scan files that are already opened.
And, as with previous programs, go through the verification process through Steam. If everything is OK, restart your computer.
Fix #2: Reset The Network Adapter
An additional problem that might be the root of this issue might be the Winsock catalog. Rolling it back to previous settings should do the trick. What you can do is execute the reset command by following these simple steps:
- Hold down the Windows button and press R to open the run dialog
- Paste this: netsh winsock reset in that window
- Click on ok, and reboot your computer.
Fix #3: Replace corrupted files
If the previous two fixes didn’t help you, you will have to troubleshoot files. Once you find out which file is the one the is corrupt or missing, you can download it again. To do so, simply follow these steps:
- Close steam and go to the Steam folder which, by default, is in Program Files.
- Go to the directory named logs and open ‘txt’.
- Go to the end of the document and try to find recent errors.
Here is a sample of what you should be looking for:
[2017-04-12 12:47:31] [AppID 346110] Update canceled: File commit failed: failed to move unchanged file “C:\Program Files (x86)\Steam\steamapps\workshop\content\346110\570371714\LinuxNoEditor[…]”
From that line, there are 2 numbers you should note. The first is your AppID number. It is the first number in the line. In this example, the one starting with 346. The other number is the root directory of the mod. In this sample, the one starting with 570.
- Go to the root directory.
- Open Steam again and go to the downloads directory. In that folder, you should see that Steam is requesting updates for your game. Simply update the files and everything should be ok.
Fix #4: Move Steam files.
If any of the simpler fixes didn’t do it for you, you might have to move the Steam Installation and game files. There are two big parts of this method. The first one is relocating Steam as such. Once you do it, test to see if it will run properly. If there is an error during launch, you will have to uninstall it. And make sure to not interrupt the process while Steam is copying. It might corrupt the data. This is how you can do it:
- Open your steam client and go to settings
- Go to downloads and choose “Steam Library Folders”
- Add a library folder and select the new path for your Steam.
- The previous step defines the paths for all future installation. Now, you can move the existing files to that location.
- Close Steam
- Go to your steam folder (by default, it should be in Program files/Steam)
- Erase all folders and files barring SteamApps and UserData. And, do not erase .exe.
- Move all the directories to the new destination.
- Open Steam again and log in.
This should fix the issue. However, if you face any difficulties while attempting to move the folder or while trying to launch it, try the below method:
- Close the steam client
- Go to your new steam location
- Move the SteamApps folder to the desktop
- Remove Steam (this way you can remove your older settings from your computer)
- Install it once more, but to the location you previously chose
- Move the SteamApps folder from the desktop back to the Steam directory. This folder holds all of your saves, settings and game content.
- Open Steam again and log in
- Go through the verification process to check the games files integrity.
- Play your game