I came across an interesting issue earlier today. Somehow, on my NTFS-formatted external hard disk I had managed to create a file system structure which was too deep.
Whenever I tried to delete a particular folder tree, I received strange errors about files which couldn’t be deleted:
Error Deleting File or Folder
Cannot delete foldername: The file name you specified is not valid or too long. Specify a different file name.
I thought that was strange – after all, I’d managed to create the files in the first place, then I found that if I drilled down to the files that would not delete, there was no right-click option to delete the file. Finally, I found that some folders displayed the following error when I tried to access them:
Can’t access this folder.
Path is too long.
It turned out that the problem folders/files had path names in excess of 255 characters. By renaming some of the top level folders to single character folder names (thus reducing the length of the path), I was able to access the problem files and folders, including deleting the files that I wanted to remove.