When you try to delete a folder/file, you get the following error:
“Could not find this item. This is no longer located in C:\Code. Verify the item’s location and try again.”
The file or folder contains invalid characters. This can sometimes happen when downloading files from another operating system.
1.Press the Windows key + R.
2.Type cmd and press Enter to go to the Window Command Prompt.
3.Go inside the folder that you cannot delete, for example C:\Code
4.Type the command dir /x to list all the folders/files under C:\Code folder, for example:
03/03/2017 08:19 AM DIR ACCESS~1 AccessAssignement
Notice the short name ACCESS~1. This short name is important for folders/files at this task
5.Delete the folders/files inside with the same way by the command
rd ACCESS~1 /q to delete the folder
del ACCESS~1 /f /q to delete the file
+If the folder/file doesn’t have the short name, we can use full name instead. For example:
rd AccessAssignement /q
+We need to go inside the most child folder to delete all the files and folders recursively. Then, the final is the most outer folder.