Wednesday, March 25, 2015

Cannot delete a folder or file - Error "this is no longer located in"

Cannot delete a folder or file - Error "this is no longer located in"


Symptoms:
Trying to delete a folder or file and getting an error message "this is no longer located in [FOLDER NAME]"



Solution:

1. Go to 'Start' -> Click 'All Programs' -> Click 'Accessories'

2. Right-click 'Command prompt', and then click 'Run as administrator'

    * If you are in Windows 8, use Windows logo key + Q  to search in Metro (right side of your     
       screen). In the search field, type in 'cmd', in the search result, you will find 'Command prompt', 
       right-click 'Command Prompt', then click 'Run as administrator'.
       


3. In the newly popup command prompt, go to the folder that you cannot delete
    * in my case, i will use a folder called "Best Friends" as example


4. run "dir /x/p/a" command, you will see the following result


5. rename the "Best Friends" folder to a folder called "folder" with following command "ren     
    BESTFR~1 folder"  
    * The "BESTFR~1" is showing in your previous command, you will find your own folder name 
       from last command


6. Once, the "Best Friends" folder has been renamed to "folder", you can delete from anywhere.