I was working on of my projects @office and wanted to delete a directory deep in the source tree. I use NTFS partitions(yes I am stuck with Windows XP) and I encountered this funny error:
Cannot delete 'a_huge_pathname/': The file name you specified is not valid or too long. Specify a different file name.
I looked at this and was surprised since I had never heard about this funny business before. The problem was with the path to the file being longer than 255 characters. Anyways had to get going so tried some of the tricks I could of think of then, including couple of lines in Ruby but just could not get through[:(].
Finally I landed here and the revelation was made. I only had to rename a couple of dirs to single char names and Voila! the directory was gone. Hurray! back to business.
Thursday, July 31, 2008
Cannot delete foldername: The file name you specified is not valid or too long. Specify a different file name.
Subscribe to:
Post Comments (Atom)
Labels
- linux (4)
- windows (3)
- personal (2)
- ubuntu (2)
- Blogger (1)
- IE 7 (1)
- Interview (1)
- Javascript (1)
- Puzzle (1)
- SQL (1)
- SyntaxHighlighter (1)
- adobe (1)
- alive (1)
- crossdomain (1)
- fiesty (1)
- file-system (1)
- flash player (1)
- kismet (1)
- linkedIn (1)
- localhost (1)
- mplayer (1)
- n00bs (1)
- ntfs (1)
- problem (1)
- registry (1)
- security (1)
- solution (1)
- tips n tricks (1)

2 Comments:
AFAIR, I've faced the issue a couple of times. In such cases, I tried to delete the file permanently (Shift + Delete) since I wanted to delete the file permanently.
Hmm that's interesting. Why don't we try doing this again?