Cannot delete file: Cannot read from the source

This might end up being my only post concerning Windows OS. I came across this problem few months back. I was trying to delete a file the OS(Windows XP SP3) had created on my OS drive and every time I tried to delete the file I got an error Cannot delete file: Cannot read from the source file or disk.

The dialog that tortured me for weeks.

If I remember correctly I was downloading a file. As it is with Bangalore(Bengaluru), there was a power cut and I naively turned off my UPS without shutting down my machine. When I restarted my machine, the OS wanted to verify the file system. The verification went fine till, it reached the file I was downloading. It started to verify the file I was downloading before I switched off the power and hanged there for minutes. I got frustrated and restarted the machine again and also started my problem.

My system booted and I skipped disk verification. As I logged into my profile, I got a warning informing me that there wasn’t enough space on my OS drive. I was downloading the file to my Desktop. I was pretty sure that I had free space of at least 1.5 GB. I started checking and realized my Downloads folder has bloated by 1 GB. On checking I realized that there was a file with special characters like $ etc for file name. I can’t exactly remember the file name(It never occurred to me that I should save the file name somewhere). It was weird because it was completely made up of special characters.

I spent days trying to figure out ways to delete this file, tried everything. Manual deleting, deleting from command prompt, etc. Some genius had given an explanation and had asked people to use

del “\\?\$File_Path

I tried this too, but it didn’t work for me. I was one of the very few people for whom it didn’t work. May be my sins were greater. It was like “I threw the kitchen sink on the file and it threw the bath tub back on me”. No matter what I did, the OS didn’t clear this garbage file and kept throwing the same error “Cannot delete file: Cannot read from the source file or disk ” . With every passing day I was seriously considering formatting my OS drive and re-installing the OS. I desperately thought if Kareem were around, He would have given some solution. Finally I decided to put the issue on the back burner for a while. Then after few days I started thinking of deleting my profile, While trying different things I realized, while I couldn’t delete the file, I could move its parent folder around. I thought why not create a new profile and see if I could move the unreadable file to that profile’s Desktop/My Documents folder and delete the account with all it’s file. So I did the following.

1. Go to start -> Settings -> Control Panel -> User Accounts -> Create a new account and create a new non-admin account.
2. Restart your machine again and while the Machine is restarting press F8 to go to Safe mode.
3. Log in as administrator again
4. Open My Documents from the start menu and click the folders icon to open up the left hand panel of the explorer window.
5. Navigate to the parent folder of the file/folder you want to delete
6. Have it selected in the right hand pane of explorer. From the file menu at the top select edit then select “move to folder….”.
7. When the navigation widow opens, navigate to “C:\Documents and Settings\newProfile” of the new user id created and press the move button of the dialog
8. Now restart windows normally and log into your normal account and again start -> Settings -> Control Panel -> User Accounts -> change accounts -> and select the new user account you created.
9. select delete account -> select to delete all files, and delete account.

The moment I had waited for few weeks finally occurred the file was deleted with the new the Profile I had created. Thus solving my problem.

I know the solution is complicated but if nothing else works this solution would be the better and also less time-consuming than reinstalling the OS or for that matter deleting the user profile.

Advertisements

14 thoughts on “Cannot delete file: Cannot read from the source

  1. Very good article..Two points i took from the article are
    * Always shutdown the system(If possible)
    * Don’t cancel the verification(Let it finish)

    Bonus point:Formatting your PC should be the last option….There will always be a solution around the corner…

  2. Hey nice to see you writing on windows related blogs
    ======================================

    I would love to see more like this :)-

    1.Never do hard reset or shutdown.
    The reason it asked you verify disk is because of hard shutdown.

    Some service was stopping you to delete this file i guess,Did u try going to task manager and see which unwanted service was causing this issue.

    May be you had a startup process in that User login so it was behaving that way.

    But well done you managed to fix Windows Machines.

    • It never occurred to me that some services might be using the file. Since the OS could never read the file I thought it was because of the file name. It was made entirely of special characters. I hope I would be able to write more about Windows OS. I cannot argue with you on about Systems. You are simply better than me when it comes to systems.

  3. great post buddy πŸ™‚

    Most of the issues can be resolved by logging in safe mode itself .. πŸ™‚

    I remember deleting a virus file this way.
    Each time my os started , AVAST warned me about existence of virus and its location. For some reason, avast was unable to delete the file . All I needed to do was delete one virus infected file .
    I was so frustrated that I was about to use the
    Brahmastra ( master weapon ) i.e reinstalling OS .

    Then , I used the safe mode technique to delete the file

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s