Any disk utilities to correct overly long file names/folder paths?

Discussion in 'Windows Server' started by boe, Feb 28, 2010.

  1. boe

    boe Guest


    A company I work with has many folders nested within subfolders, within
    subfolders with really long folder names that when you go all the way to the
    end exceed 255 characters. Robocopy, richtools, etc all fail when copying
    these really long folder paths and file names. Is there any utility I can
    run to correct these or at least identify all of them? I need to copy a 4TB
    volume and it keeps failing. I can't have the server offline for too long
    and I can't wait for it to fail to fix all of them.

    boe, Feb 28, 2010
    1. Advertisements

  2. Hello boe,

    Never had problems when using robocopy, either with longer then 255 characters
    or even with corrupted files. But as you said that also this tools fail i
    have no idea. Normally i suggest to use that tools exactly for that reason.

    Best regards

    Meinolf Weber
    Meinolf Weber [MVP-DS], Feb 28, 2010
    1. Advertisements

  3. A small number of commands such as ntbackup.exe or robocopy.exe can cope
    with excessively long path names. To identify the culprits you can run this
    batch file:

    @echo off
    dir /s /b "d:\User Data" 1>nul 2>d:\Error.txt
    Pegasus [MVP], Feb 28, 2010
  4. boe

    boe Guest

    Thanks - not sure why rich copy isn't working - perhaps a setting I should
    have used.
    boe, Feb 28, 2010
  5. boe

    boe Guest

    Thanks - I started your batch file a few minutes ago and it has already
    found 100 such directories. I have 4 TB to scan so it will take a while
    but this is VERY good to know.
    boe, Feb 28, 2010
  6. Thanks for the feedback. I think you will need to educate your users so that
    they put their information into the files themselves rather than into the
    file and folder names.
    Pegasus [MVP], Feb 28, 2010
  7. Hello Pegasus [MVP],


    Best regards

    Meinolf Weber
    Meinolf Weber [MVP-DS], Feb 28, 2010
  8. boe

    boe Guest

    I'm not sure if I should start a new thread but is there any similar command
    I can use to find invalid file names? We have a lot of mac users and I've
    seen a few invalid file names spaces at the beginning end, crazy
    punctuation - even saw files with weird space invader type characters.
    boe, Mar 1, 2010
  9. I haven't tried it, but after a brief search (trying to nail down the right
    search string), I found the following that may do the trick. I'm sure there
    are others out there.

    DelinvFile 4.04
    Quoted: "DelinvFile is a Windows Utility that you can use to delete files or
    folders and that you are not able to delete using the standard Windows
    Delete function. A convenient User Interface is provided for selecting the
    file or folder that you need to delete. You use the standard controls for
    Drives, Folders, and Files to navigate to the Folder or File to be deleted.
    Recent versions include a function to Scan for Invalid and Too-Long

    I hope that helps.

    Otherwise, I know you said Robocopy didn't work, but I thought it supports
    and copies longer than valid name? I guess I stand corrected. But have you
    tried RoboCopy's switches to copy the volume? Robocopy has a switch
    ("/256") that disables support for the longer folder names (MAX_PATH, or
    the 8.3 name. Robocopy also, has a switch to force 8.3 (/fat). Unless you
    haven't tried it, give it a whirl. Read more here:



    This posting is provided "AS-IS" with no warranties or guarantees and
    confers no rights.

    Please reply back to the newsgroup or forum for collaboration benefit among
    responding engineers, and to help others benefit from your resolution.

    Ace Fekay, MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE &
    MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services

    If you feel this is an urgent issue and require immediate assistance, please
    contact Microsoft PSS directly. Please check
    for regional support phone numbers.
    Ace Fekay [MVP-DS, MCT], Mar 1, 2010
  10. boe

    boe Guest

    Thanks - I thought robocopy was replaced by richcopy.
    boe, Mar 1, 2010
  11. Both have been around for many, many years. Richcopy came out in 2001, so I
    wouldn't look at it as a replacement.

    As for your dilemma, I would either try that third party software that I
    mentioned, or take up Pegasus on his offer with the VB script.

    If I were you, and this is a production critical sceanrio, I would look at
    the easiest and most efficient way possible to get your task done.

    Ace Fekay [MVP-DS, MCT], Mar 2, 2010
  12. The OP could run robocopy with the /L switch. It won't copy anything but it
    just might report the invalid file names.
    Pegasus [MVP], Mar 2, 2010

  13. Good point that I didn't think of. :)

    Ace Fekay [MVP-DS, MCT], Mar 2, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.