I need to detect and repair long filenames

Got it! Using FileLocator Pro and scripting it's fairly simple:

  1. Put the attached script somewhere on your hard drive.
  2. Open FileLocator Pro
  3. Go to the scripting tab
  4. Activate the 'Filename' script and select the path to the script
  5. Put the value 240 in the 'Custom' field
  6. Make sure the engine field is set to "JScript"
  7. Click Search
  8. The result box will list all files where the pathname > 240 chars in length.

If you want to search for files "less than" simply change the script.

For each result, right click on the file and select "Explore Here". Rename the directory path to shorten it, then repeat the search until there are no results at all.

-----start file named "max path length search.js"----

// Example of a script to identify files from the length of the full pathname
var nMaxLen = parseInt( SearchParms.FilenameCustomParm);
function isValidFileName( strPath, strFileName )
{
       var bIsValid = true;
       try
       {
               bIsValid = (strPath + strFileName).length > nMaxLen;
       } catch( e ) {}
       return bIsValid;
}

-----end file named "max path length search.js"----