Can't get long file names to work, any ideas?

Page 1 of 2 12 LastLast

  1. Posts : 41
    Windows 10 Pro 64bit
       #1

    Can't get long file names to work, any ideas?


    hello! i'm trying to copy files from an external USB drive (NTFS) to a NAS drive (EXT4) using Windows Explorer and getting the long file names error (ie path is longer than 255 characters). i have tried to get long files names to work, but the group policy doesn't seem to do anything.. in Group Policy > Computer Configuration > Administrative Templates > System > Filesystem > Enable NTFS long paths, restart computer; i have also confirmed that the value in the registry is set correctly- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled set to 1.

    i have tried the file copy from computers with and without the creators update (all other updates installed) and i don't think this is a NAS issue because i can copy the files from a linux live CD without issue.

    i'm hoping that this is just something simple that i'm missing, i've been looking around and haven't found any other fixes.

    many thanks!
    Last edited by Matt26; 02 Jan 2018 at 10:08.
      My Computer


  2. Posts : 34,974
    Win 10 Pro (1903) (2nd PC is 21H2)
       #2

    Discussion here: see #10
    Insider Members - CU update has it fixed long file names - Windows 10 Forums

    There may be some more recent comment..
    Cannot get Long Filenames / directory names to work - Windows 10 Forums

    See
    Can't get long file names to work, any ideas?-2.jpg

    Long File Names?


    Even if the OS supported it, that the program would have to too seems to be a key point.
      My Computers


  3. Posts : 41
    Windows 10 Pro 64bit
    Thread Starter
       #3

    thanks, so windows explorer does not currently support the long file names option? are there any alternatives to explorer built into windows 10 (besides robocopy) that support long file names?
      My Computer


  4. Posts : 5,478
    2004
       #4

    Matt26 said:
    thanks, so windows explorer does not currently support the long file names option?
    Correct. Sad but true. People have been complaining since 1890 and there are plenty of malware you can download to "solve" this. Many sites will delete your account for even mentioning "long file name".
    Matt26 said:
    are there any alternatives to explorer built into windows 10 (besides robocopy) that support long file names?
    To do what? Powershell supports long file names without doing anything certainly, I believe cmd does too (but haven't tried).

    Are you looking for a GUI or what?
      My Computer


  5. Posts : 12,429
    Win10 Version 21H2 Pro and Home, Win11 Pro
       #5

    If I may: an issue with some things happening in File Explorer [and the older Windows Explorer] is that it is pretty much the core of Windows, if it doesn't work neither does Windows, makes things hard to change without dumping the OS and starting fresh. Also explains the interweaving/interaction between Windows and Internet Explorer being able to browse the hard drive storage. Win10 has come a long way in that 16-bit programs of old don't work properly, if at all.

    Has a Bootable LiveDVD of a version of Linux been tried? Have seen times where that is viable. Most versions can deal with a number of drive formats but I haven't tried the LFN of more than 255 characters. Another thought for transferring of files is to compress folder contents into 1 file with a simple name, move it further up the tree then transfer to another location, have had to do that a few times.

    Maybe it's coming closer to the 128-bit OS?
      My Computers


  6. Posts : 41
    Windows 10 Pro 64bit
    Thread Starter
       #6

    lx07 said:
    Correct. Sad but true. People have been complaining since 1890 and there are plenty of malware you can download to "solve" this. Many sites will delete your account for even mentioning "long file name".
    To do what? Powershell supports long file names without doing anything certainly, I believe cmd does too (but haven't tried).

    Are you looking for a GUI or what?
    folder copies with nested files and folders exceeding the 255 character limit- the challenge is when you're copying GB's worth of data, only to have windows explorer halt on a long file name hours into the process- no choice but to cancel the copy or skip the file and hope there aren't many more that explorer will again fail to handle.. very frustrating.

    ideally yes, i would like a gui alternative, but i assume windows 10 does not have one? are there any well known third party options that are compatible with long file names?
      My Computer


  7. Posts : 41
    Windows 10 Pro 64bit
    Thread Starter
       #7

    Berton said:
    If I may: an issue with some things happening in File Explorer [and the older Windows Explorer] is that it is pretty much the core of Windows, if it doesn't work neither does Windows, makes things hard to change without dumping the OS and starting fresh. Also explains the interweaving/interaction between Windows and Internet Explorer being able to browse the hard drive storage. Win10 has come a long way in that 16-bit programs of old don't work properly, if at all.

    Has a Bootable LiveDVD of a version of Linux been tried? Have seen times where that is viable. Most versions can deal with a number of drive formats but I haven't tried the LFN of more than 255 characters. Another thought for transferring of files is to compress folder contents into 1 file with a simple name, move it further up the tree then transfer to another location, have had to do that a few times.

    Maybe it's coming closer to the 128-bit OS?
    yes i have tried a Ubuntu live cd, it does get past the long files names, unfortunately is fails on "symbolic links" which i assume refers to link or shortcut files.
      My Computer


  8. Posts : 13,585
    Windows10
       #8

    A workaround is to map network drives eg suppose you have seven levels

    Eg z:\ = c:\folder1\folder2\......\folder5

    Then z drive only sees folder6 and folder7.
      My Computer


  9. Posts : 41
    Windows 10 Pro 64bit
    Thread Starter
       #9

    cereberus said:
    A workaround is to map network drives eg suppose you have seven levels

    Eg z:\ = c:\folder1\folder2\......\folder5

    Then z drive only sees folder6 and folder7.
    i've though about that, but would get cumbersome if you're dealing with many folders.
      My Computer


  10. Posts : 5,478
    2004
       #10

    Is your file name > 260? Or the path?

    This works for me (where the path is 20 x alphabet so 520 characters (plus delimiters etc). Much greater than 260 anyway.
    Code:
    PS C:\temp> echo nul > C:\temp\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfgh
    jklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuio
    pqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\az
    ertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwx
    cvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\Path520.txt

    but this fails (same path but file name is another 20x alphabet 520 + characters)
    Code:
    PS C:\temp> echo nul > C:\temp\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfgh
    jklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuio
    pqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\az
    ertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwx
    cvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghj
    klmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfg
    hjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsd
    fghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopq
    sdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbn_path520_and_520longfilename.txt
    out-file : The specified path, file name, or both are too long. The fully qualified file name must be less than 260
    characters, and the directory name must be less than 248 characters.
    At line:1 char:1
    + echo nul > C:\temp\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxc ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (:) [Out-File], PathTooLongException
        + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand
    
    PS C:\temp>
    As does this with just a long file name
    Code:
    PS C:\temp> echo nul > C:\temp\azertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjkl
    mwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghj
    klmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfg
    hjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbnazertyuiopqsd
    fghjklmwxcvbnazertyuiopqsdfghjklmwxcvbn_longfilename.txt
    out-file : The specified path, file name, or both are too long. The fully qualified file name must be less than 260
    characters, and the directory name must be less than 248 characters.
    At line:1 char:1
    + echo nul > C:\temp\azertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcv ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (:) [Out-File], PathTooLongException
        + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand
    
    PS C:\temp>


    So it looks like (with long path enabled as you described above obviously) it enables long paths but not long file names. The error message it gives is incorrect and hasn't been updated to cover the GPO/registry change opt-in but never mind

    If you have made a item with a long path (like in my first example) you can move it OK with the Copy-Item command.

    For example:
    Code:
    PS C:\temp> copy-item C:\temp\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklm
    wxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfgh
    jklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqs
    dfghjklmwxcvbn\Path520.txt C:\temp\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfg
    hjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopq
    sdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyu
    iopqsdfghjklmwxcvbn\Path520_copy.txt
    Works OK
    Code:
    PS C:\temp> ls C:\temp\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\
    azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxc
    vbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjkl
    mwxcvbn
    
    
        Directory: C:\temp\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn
        \azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghj
        klmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyuiopqsdfghjklmwxcvbn\azertyui
        opqsdfghjklmwxcvbn
    
    
    Mode                LastWriteTime         Length Name
    ----                -------------         ------ ----
    d-----        02-Jan-18     23:56                azertyuiopqsdfghjklmwxcvbn
    -a----        03-Jan-18     00:46             12 Path520.txt
    -a----        03-Jan-18     00:46             12 Path520_copy.txt
    
    
    PS C:\temp>


    If your problem is with long file names rather than long path names then I don't know what to suggest (perhaps it is not possible) but Copy-Item appears to work fine.

    I tried with file explorer. I can browse to the directory but cant copy or paste anything - it gives no error just does nothing. I deleted C:\temp (the whole directory I was just testing with) using file explorer and it just trashed it. It didn't go to recycle bin - just vanished.

    Clearly there are a few issues with long path names still (in the GUI) but if all you want to do is copy then I would suggest Copy-Item. Seems to work OK.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:25.
Find Us




Windows 10 Forums