How to Remove Deleted Ghost Files

A ghost file is a file that cannot be deleted by normal means. Users will typically receive an error similar to “cannot delete folder” or “cannot delete file”. Usually, the problem with a ghost file is caused by system corruption, the system locking the ghost file, or a virus immediately recreating the ghost file once it is deleted. The solution usually requires the user to repair the system file structure, make a bootable DVD or find other means to access the ghost file before the system boots completely, or delete the virus in question.

...
Ghost files can be a pain to delete.

System Corruption

Step

Click on the “Start” button. Select “Run”.

Step

Type “chkdsk /f [drive]:”. Replace [drive] with the drive letter where the ghost file is.

Step

Select “OK”.

Step

Wait for the Check Disk program to complete its scan. This may take some time, depending on how fast your computer is.

Step

Delete the desired ghost file.

Delete Locked Ghost Files Before Bootup

Step

Write down the location and name of the ghost file in question.

Step

Place your installation CD into the CD/DVD ROM drive. Restart your computer and boot from the installation CD. You may need to configure your computer to boot from the CD/DVD ROM drive first.

Step

Click on "Repair your computer" if you are running Windows 7 or Vista. Press "R" when the "welcome to Setup" screen appears if you are running Windows XP.

Step

Select the installation of Windows with the ghost file on it. For computers running XP, you may also need to enter the administrator password if there is one.

Step

Select "Command Prompt" for machines running Windows 7 or Vista. If you are running Windows XP, you should be given the command prompt automatically.

Step

Type in “cd [path]” into the command prompt, where [path] is the location you wrote down from Step 1. Hit enter.

Step

Type “del [ghost file]”, where [ghost file] is the name of the ghost file in question. Reboot the computer.

Unlocking Files Using "msconfig"

Step

Hold down the Windows key and press “R”. Type “msconfig” and hit the “enter” key.

Step

Select the tab labeled “Startup”.

Step

Uncheck the boxes that correspond with any ghost files you are attempting to delete. Reboot the system.

Step

Delete the desired ghost file.

Unlocking Files Using “regedit”

Step

Hold down the Windows key and press “R”. Type “regedit” and hit the “enter” key.

Step

Select “Yes” in the dialogue box titled “User Account Control” if present.

Step

Press Ctrl + F. Type in the name of the ghost file and hit “enter”.

Step

Press F3 if the first search is not the exact name of the ghost file in question.

Step

Backup the registry entry by selecting “File”, then “Export”. Save the entry someplace easy to access and remember. This action will help protect your system if you prevent a critical file from loading.

Step

Press the delete button and confirm the deletion.

Step

Continue to scan for additional entries, repeating steps 4 through 6. Delete all occurrences of the file in question. Once this is completed, reboot the system and delete the desired ghost file.