Windows 8 and 8.1 Forums


How to delete/replace a single known corrupted file

  1. #1

    How to delete/replace a single known corrupted file


    In an earlier thread, I've learned how to correct system problems using 'sfc' and 'dism'. The question I'm asking here, is once you know exactly which files are corrupted, how can they manually be replaced?

    The PC I'm still working on had several bad files, but between 'sfc' and 'dism' only two remain. Using 'sfc /scannow' there are no more problems, but 'dism' still finds two, one that relates to 'flash', and the other being 'skydrive.exe'.

    My plan for tomorrow is to remove 'Flash' completely, which I expect to remove that corrupted file. But 'skydrive' seems to be a part of Windows Explorer. On a mounted, running file system, is there any way to replace a single file with a non-corrupted version?


    The best idea I can think of is to place a copy of the file, in this case 'skydrive.exe' in the same folder as the corrupted file, but with a modified name, maybe 'skydrivexxx.exe'. Then, boot to Safe Mode with Command Prompt, navigate to the appropriate folder, rename the corrupted file to 'skydrive-bad.exe', and finally rename the good version to 'skydrive.exe'. Would Windows actually let me do this?

    Last question - on another computer I used for checking, skydrive.exe is in this folder:
    c:\Windows\WinSxS\amd64_microsoft-windows-skydrive-exehost_31bf3856ad364e35_6.3.9600.17484_none_77b78082feb70f58
    If this idea is even plausible, are there other things I would need to do, possibly with the 'attrib' command, to allow the system to accept what I've done?

    (I doubt that this will work; it's too simple. )

      My System SpecsSystem Spec

  2. #2


    Austin TX metro area
    Posts : 640
    Windows 7 Pro 64bit [MS blue-disk set]


    Why not simply delete the bad known file and immediately copy in the good file? I think you can do this easier within Safe Mode.
      My System SpecsSystem Spec

  3. #3


    San Jose - California
    Posts : 2,847
    8.1x64PWMC Ubuntu14.04x64 MintMate17x64


    As said in the other thread that you created. Most files under WinSxS are hardlinked so you need to find out which is the real file name of the file then you can replace it. For example: notepad.exe

    From Admin Command prompt, type: fsutil hardlink list c:\windows\notepad.exe then you'll find out the result as follows:
    Click image for larger version
      My System SpecsSystem Spec

  4. #4


    Quote Originally Posted by topgundcp View Post
    As said in the other thread that you created. Most files under WinSxS are hardlinked so you need to find out which is the real file name of the file then you can replace it. For example: notepad.exe

    From Admin Command prompt, type: fsutil hardlink list c:\windows\notepad.exe then.....
    I have two files to remove or repair from a desktop. I have the full pathname to both - got that from the diagnostic reports. (Thanks to you, I now understand this.)

    I've never heard of 'fsutil hardlink list' until just now. One more tool to document and add to my toolbox.


    One of the file names is 'skydrive,exe' and I do have the complete path to it. 'dism' won't remove it. SFC doesn't see it as a problem. I was hoping to find a way to manually replace it with a non-corrupted version. I tried to re-install Skydrive (now called Onedrive?) earlier today. No change in the error. I haven't yet found a way to completely remove Skydrive/Onedrive from my OS. That would be my first choice, especially since I never use it.
      My System SpecsSystem Spec

  5. #5


    San Jose - California
    Posts : 2,847
    8.1x64PWMC Ubuntu14.04x64 MintMate17x64


    Windows is very picky sometimes and not allowing you to delete file/folder freely due to security settings especially under C:\Windows folder. The easiest way I find is to boot up from linux then delete/replace etc....

    For this, you can use: Slacko Puppy Linux release.
    It's only 160MB in size, use: Rufus - Create bootable USB then boot up from it. You'll see the list of HD's on the bottom left corner, Browse to the folder, right click and delete.
      My System SpecsSystem Spec

  6. #6


    Harrisonburg, Va.
    Posts : 10,488
    Windows 8.1.1 Pro with Media Center


    I haven't yet found a way to completely remove Skydrive/Onedrive from my OS. That would be my first choice, especially since I never use it.
    I found this---

    How to Completely Disable OneDrive - Microsoft Community
      My System SpecsSystem Spec

  7. #7


    Thanks to both of you; Linux does sound like a good way to do this, as the file will no longer be protected. By the way, here is the 'dism' entry in the log file, with directory path and file name:

    (p) CSI Payload Corrupt amd64_microsoft-windows-skydrive-exehost_31bf3856ad364e35_6.3.9600.17230_none_77e98b2afe9223f9\SkyDrive.exe

    David Bailey, that's one of the places I already found, but 'disabling' it isn't likely to remove the files? If I could delete it, then maybe - but from what I've read so far, I'd have to remove Internet Explorer to do that.

    I've only got one week left before I move from Madurai to Pondicherry, so maybe I'll just leave it as-is until my next visit.

    Quick question - if I boot into Safe Mode, with DOS prompt, does that in any way start "Windows"? I've already found how to go to a "long directory name" (put it in double quotes). If my memory is correct, I think I could then use the "attrib" command to remove any system permission it had, change it to "rw" instead of "r", and then rename it. I guess if I want to do that, I should first do whats in the link David Bailey posted before the change, so presumably nothing on the PC will be trying to find "skydrive".

    .............................or just give up, and refresh Windows.
      My System SpecsSystem Spec

How to delete/replace a single known corrupted file
Related Threads
Hi - I need help in deleting files that look to be corrupt. Both the file name and the extension contain Chinese character. When I try to delete them I get the following error: " Could not fine this item" followed by "This item is no longer located in M:\..." This is what the file names look...
Hello everybody, Here i am back, at school we must play with the attribs of a file in the cmd, i know how i must add and delete ATTRIBs from a file. but there apparently excists a manner for replace the original ATTRIB's, but I don't know what the commando is.
Hey, yesterday I connected my external HDD to my laptop, and I noticed that a folder was corrupt, suddenly. The folder didn't have the folder icon, and I couldn't access to it. I was mad about that cause that folder had very valuable files o'mine. I was just about ask here for help, but I've...
Accessing a corrupted word file in Software and Apps
Hello, I'm a bit hazy on the details of this one as I'm not exactly sure what happened. A few weeks ago I had some issues with not being able to save files. This came at an inconvenient time for work and I was pretty stressed out. I can't actually remember what I did to solve this but the...
Hi I had a 20 GB image file . Weeks before the partitions with the appropriate drive software acronis all files have been deleted . Therefore Ontrack.EasyRecovery.Professional.10.1.0.1 recovery software to recover files but when I run the ISO file with the following error is encounteredlogin ....
Corrupted cbs file in General Support
I did the system scan and it says that i have a corrupted cbs.log file and its unable to fix. Can someone please help
If you go four levels down: C: \ 1 \ 2 \ 3 \ 4 . . . and right-click on 4 to make a: New / Folder . . . . . . if there are a lot of folders in the right hand pane, and your mouse is hovering over one of them, after you click on the word "Folder," it doesn't do the expected action, to give...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook