Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a file in a folder that I use for python programming and when I moved the folder everything would go but the file.

I don't know how it got there but when I try to delete it I get "Filename is not valid or too long".
If I double click it says "The specified path does not exist". When I looked up these issues they either referenced symbolic links, which I doubt this is, or said delete it in command prompt.

When I try in command prompt it says it could find the file even though it shows up in "dir". I think it might have to do with the filename being invalid but I don't know what to do about it. The file is called simonload,pickle,time and I know it comes from import simonload,pickle,time in one of my python files but I don't know how.

share|improve this question

1 Answer 1

There's nothing invalid about that name under Windows unless maybe there are some additional non-printing characters in there you're not seeing.

It could be too long if it's far down in a directory tree, causing the entire path to exceed the Windows MAX_PATH limitation of 260 characters for applications that don't yet support long Unicode names. If that's all it is, one possible solution to that is to go up a few levels, then temporarily move that whole subtree (including the part you want to get rid of) up somewhere closer to the root, just to temporarily shorten the path.

To me, it sounds more like a problem with the ACL on that file that's preventing you from deleting it. You can check this using cacls.

share|improve this answer
    
Explorer won't let me move the file and when I cacls the file it says it can't find it. I tried it at least 5 times and I'm certain there was no spelling mistake in the directory path. I checked the length of the filename plus the directory path and its only about 60 characters long. –  smithy545 Dec 2 '12 at 14:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.