Recycle bin can't handle long filenames



  • Of course me having those particular files on windows is a separate :wtf:



  • What was the offending filename? And why didn't it tell you?



  • C:\Users\gravejunker\.vim\my.vimrc
    C:\$Recycle.Bin\S-1-5-21-440380263-2372808961-857351848-5203\$R9BTA8U.vim\$RXRBIDZ.vimrc

    ♫ One of these things is not like the others, ♫
    ♫ One of these things just doesn't belong... ♫


  • sockdevs

    That's far more likely to be hitting the filepath length limit ;)
    IIRC, it's 254 characters.



  • Try deleting it with Emacs.



  • I have a folder that Steam created that has thus far eluded all of my attempts to delete it, because the name is longer than the maximum length allowed by the Windows API.

    I could probably get it with the right incantation of a \\?\ path, but wasn't so successful when I tried that before.

    (When you tell Steam to back up programs A, B, and C, it will create a folder named 'A and B and C'; I backed up much of my library.)



  • https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx:

    [b]Maximum Path Length Limitation[/b] In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character.
    So yes, it’s probably simply the path to the original file being too long to add \$Recycle.Bin\ or whatever in front of it without going over that limit.


  • Can you convert the long file name to a short (8.3) one?



  • @TwelveBaud said:

    C:$Recycle.Bin\S-1-5-21-440380263-2372808961-857351848-5203$R9BTA8U.vim$RXRBIDZ.vimrc

    TRWTF?
    The ~/.local/share/Trash/files and ~/.local/share/Trash/info way looks much saner.



  • @ben_lubar said:

    What was the offending filename?

    I use pathogen so .vim/bundle contains some git repos, some with submodules.

    @ben_lubar said:

    And why didn't it tell you?

    Because showing it in that dialog would be ugly?



  • Isn't the problem that the file/folder starts with a period? From what I understand explorer won't let you mess with those.

    Try creating a file called .something. Explorer won't let you, but another program will.


  • sockdevs

    @russ0519 said:

    Isn't the problem that the file/folder starts with a period?

    Nope; Explorer may not like it, but the filesystem is fine with it ;)



  • @RaceProUK said:

    Nope; Explorer may not like it, but the filesystem is fine with it

    But he's deleting using explorer.


  • sockdevs

    All Explorer does is tell the filesystem to delete (although it's actually a move to Recycle Bin); the filesystem handles the actual mechanics ;)


  • Winner of the 2016 Presidential Election

    @RaceProUK said:

    Nope; Explorer may not like it, but the filesystem is fine with it

    This. NTFS will quite happily differentiate between name and Name as well. Explorer is fine with displaying it, too. But any kind of renaming attempt has high chances of ending in tears.



  • I've had to boot into Linux many times just to deal with files that some program had created and were longer than the maximum path or had illegal characters.

    (looking at you, Opera 12)



  • @russ0519 said:

    Isn't the problem that the file/folder starts with a period?

    Could be, but the error message says:

    The folder contains items whose names are too long for the Recycle Bin.
    so I read that as the problem likely being that there are files in .vim whose paths will exceed the maximum allowed length if the $Recycle.Bin bit is added.

  • Discourse touched me in a no-no place

    You're not supposed to put the file contents in the filename!


  • Winner of the 2016 Presidential Election

    @dkf said:

    You're not supposed to put the file contents in the filename!

    How about the type? :trollface:


  • Discourse touched me in a no-no place

    @Onyx said:

    How about the type? :trollface:

    As opposed to the entire history of metadata associated with the file? :facepalm:



  • @dkf said:

    You're not supposed to put the file contents in the filename!

    Why not? That's the secret sauce to my filesystem: BigDataFS. It's amazing. There is no limit to the filesize, or number of files on even a small device, instant retrieval, it works in any language, without libraries. The only downside is that BDFS can't tell you whether a file already exists or not. But that's easy to work around.



  • Can I traverse its directories?



  • Yes, but it won't tell you a list of the files in the directory because they're all in there.

    Also, important to note is that files cannot contain \x00.



  • Ah ben, you must be a happy user of BDFS! You seem to know all about it.

    And yes all files (and all directories) are in all directories.


  • Winner of the 2016 Presidential Election

    @superjer said:

    And yes all files (and all directories) are in all directories.

    OB: It's directories all the way down?


  • Winner of the 2016 Presidential Election

    @Onyx said:

    OB: It's directories all the way down?

    Only until you get to the turtles


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.