Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have downloaded this pdf file with a very long name, which cannot be opened by Adobe Reader or by Adobe Professional because it has "invalid file name".

It cannot be renamed using the DOS prompt but it has "too long name or extension". I tried to delete so that my recovery program can rename then restore it, it but it won't be deleted as a file.

The only way to delete it is by deleting the folder where it was downloaded into (which I did, but restored it later). It can't also be printed or moved or copied to another folder. Is there a way to open or rename these kinds of files?

I tried to rename it by right clicking the title but what appears is a shortened version of the options with no rename function. I then discovered that it has a password protection, which is not provided by the website from which I downloaded it.

share|improve this question

marked as duplicate by slhck Aug 29 '13 at 10:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Edited the question. The fact that it's a protected PDF is irrelevant to your question, but I can understand you thinking it has something to do with the issue. – Jan Doggen Aug 29 '13 at 9:09
up vote 11 down vote accepted

To rename a file with long file name you can try to rename it by using the short (8+3) windows name.

  • open command prompt and find the directory with the file
  • type dir /X
  • this command will show the short 8+3 names followed by long names
  • find the file you want to rename and use command

    rename "shortname" "newname"

  • "shortname" is 8+3 name and "newname" is name you want to rename to

Example: if you have a file named "verylongfilename.txt", it should have short name "verylo~1.txt" so you would use command

rename verylo~1.txt newname.txt

and should end up with file "newname.txt".

share|improve this answer
Thank you very much. This procedure did it. – elmer m Aug 29 '13 at 14:06
you're awesome man, clean and genious answer – Arekkusandaa.Irujasukin Oct 2 '14 at 18:38
This doesnt work with filenames which start with #+some numbers! such as #46574 .url123123... . i tried this and failed! – Hossein Oct 26 '14 at 18:39

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