As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

Dealing with long filenames

Mike DangerMike Danger "Diane..."a place both wonderful and strangeRegistered User regular
I have to copy some files off of a flash drive to a laptop for a customer. The problem is that half the directories/files have excessively long names, which makes copying them over an exercise in frustration. So far, I've tried an app one of my coworkers recommended that was supposed to automatically adjust names as it copied files (it didn't) and a free tool from Google that was supposed to fix names (it didn't).

Can anyone advise me on the best way to deal with this? Google leads me to lots of file renamers but nothing really specific/universally agreed on.

Steam: Mike Danger | PSN/NNID: remadeking | 3DS: 2079-9204-4075
oE0mva1.jpg
Mike Danger on

Posts

  • DehumanizedDehumanized Registered User regular
    edited August 2012
    Dehumanized on
  • ueanuean Registered User regular
    Robocopy.

    That, or use the command prompt and shorten them to 8bit names using ~. There's a name for what this is, but it boils down to this:

    "mv c:\documents and settings\somestupiduser\areallylongdirectorynamehere\*.* c:\newdir\*.*"

    Assuming that the above filename was actually 255+ chars and you encountered problems moving it you can do this instead:

    "mv c:\docume~1\somest~1\areall~1\*.* c:\newdir\*.*"

    Essentially shorten it down to 8 characters and ommit the missed chars by placing ~ in its place.

    Have soooo much fun with that by the way. *ergh*

    You can also burn a Knoppix CD or other Live Linux CD and move your files around that way.

    Guys? Hay guys?
    PSN - sumowot
  • AbracadanielAbracadaniel Registered User regular
    If it's strictly renaming, I've had a ton of luck with Ken Rename, freeware little deal.

  • bowenbowen How you doin'? Registered User regular
    So... pardon my dumbness here... but why not just do a straight copy of the files right on the drive? Right click, copy, go to c:\folderhere\ and paste?

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • electricitylikesmeelectricitylikesme Registered User regular
    bowen wrote: »
    So... pardon my dumbness here... but why not just do a straight copy of the files right on the drive? Right click, copy, go to c:\folderhere\ and paste?

    It won't work. Lots of a places in Windows have a filepath limit of 255 characters. That means if the total dir length + filename exceeds 255 (which it can easily) then it won't copy. Explorer is one of these programs.

    The key to getting around it is to copy with a utility that uses the unicode pathnames.

    The whole state of affairs is very stupid.

  • bowenbowen How you doin'? Registered User regular
    Yeah I wasn't sure if it was the 255 character limit or what. OP didn't really say much in that regards.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
Sign In or Register to comment.