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.

This question has been asked, but unfortunately none of the suggestions worked.

Here is the situation--the file is synced to a local folder on my computer in my /users folder from Google Drive. It is a pdf (looks like a saved receipt from somewhere). The name is >255 characters which throws Windows off.

What the file will not do

  • Open
  • Copy
  • Rename
  • Move
  • Paste
  • show properties

Actually I have not gotten the file to provide any sort of response besides the same error at all.

Solutions tried:

  • dir /x --no shortname is listed, it simply repeats the regular name.
  • Using FileBoss, Explorer++, 7zip
  • rmdir /S /Q <dir> doesn't really work since it is in my user folder...

If anyone has an idea to try, I'd be open to it.

Edit--In this instance the file name itself is greater than 255 characters. Changing the directories it is nested in will not affect the problem since there is no issue with the file path. (This problem in itself eliminates many other solutions).

share|improve this question
1  
Have you tried all the solutions suggested? You listed three. Out of well over a dozen. For example, UNC paths should work. –  Bob Jun 10 '13 at 5:56
    
You write you tried rename; did you also try a wildcard rename? ren *.ex1 short.ex2 [And i assume you made a typo in your question, it says '<255' instead of '>255'] –  Jan Doggen Jun 10 '13 at 6:40
    
If you are able to write a little program to do the rename you could try the \\?\ trick mentioned in msdn.microsoft.com/en-us/library/windows/desktop/… –  Jan Doggen Jun 10 '13 at 6:45
    
Possible duplicate of superuser.com/questions/489850/… Here it suggest "renaming the containing folder name(s)" so that eventually the full file spec is shorter than 255 –  Jan Doggen Jun 10 '13 at 6:47
    
Not to mention the many results Googling for "rename windows long file name 255"... –  Jan Doggen Jun 10 '13 at 6:48
show 2 more comments

3 Answers

up vote 2 down vote accepted

I would boot into a Linux Live Disc, mount your Windows drive and remove it using Linux/Unix.

I think the main commands you would need are:

mount -t ntfs-3g /dev/sdX# /mnt
cd /mnt/Users/You
rm -f further/loc/away.filename

(Note: you may need to run fdisk -l to locate your Windows partition)

and that should get you there. I had to do that at some point in time as well.

share|improve this answer
    
This worked for me. Thanks for the suggestion, I booted to PartedMagic, and had no problems. This is the easiest solution by far. –  iamwpj Jun 14 '13 at 23:37
add comment

You might want to try to take ownership of the file and see if you're able to delete it. You can do this by right-clicking the file: Properties -> Security -> Advanced -> Owner -> Edit and then change owner to your username (or Administrators group).

For more information, check this out.

share|improve this answer
    
Thanks, but I cannot view properties of the file. –  iamwpj Jun 12 '13 at 3:24
    
@iamwpj What error do you get when you try to view the properties of this file? –  Muneeb M Jun 13 '13 at 7:33
    
None, there is no option to view properties. The file is entire inaccessible. –  iamwpj Jun 14 '13 at 15:38
add comment

This is what worked for me in a similar situation:

First attempted this to take ownership:

takeown /r /d y /f my_folder

This didn't work for some files. Then I used cygwin which I already had installed and simple ran:

rm -rf path/to/my_folder

Voila, gone.

share|improve this answer
add comment

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.