I have a directory containing a file that I want to delete. However, the name of the file is too long:
> Remove-Item -Recurse target Remove-Item : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
I cannot delete it with shift+delete in Windows Explorer either:
I cannot move the file either, since its name is too long. Is there any way I can delete the file? I use Windows 8.1. Bonus points if you can explain how such a file could end up on my drive in the first place, and why Explorer and PowerShell can't delete it.