1

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.

1 Answer 1

0

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.

1
  • 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, 2012 at 14:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .