avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday October 2, 2023, 10:15 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Too Long Path utility at sourceforge  (Read 2356 times)


  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Too Long Path utility at sourceforge
« on: October 13, 2011, 06:07 PM »
On another board someone was getting "too long path" errors and wanted to know how to find the files with paths that were too long.  Searching, I found this utility on sourceforge:


Since that program was compiled AutoIt3 has been updated to use the Unicode calls by default for most API calls.  I made a few small mods to the source.  Mainly adding the "\\?\" prefix so that paths longer than 260 characters could be searched.  Here's a link to the AutoIt3 source with the mods:


You can delete the AutoIt3Wrapper directives if you like.  The only changes I made to the original was the prefix I mentioned and extending the range for the max path length in InputBox.. that type of thing.

Note that even though this will find files with very long paths, you will likely have to create a file in code to test it.  Explorer starts complaining when you create nested folders that exceed the MAX_PATH.  But I suppose some apps could create temp files with very long names/paths or whatnot.

Interactive usage:  Double click or run from command line.  Select to search all drives or pick the source of the search tree.  Enter the max path threshold.  When done it pops up the log file with any paths that exceed the threshold, or a report that none do.

To run in batch, enter the source of the search tree '*' for all, and the max path as params on the command line.  The params must be 2 and in that order or they are ignored and you get the InputBox.

Note that in batch mode you need to utilize the exit code. An exit code of 3 indicates that some too long paths were found.  Exit code is 0 if none found.  I guess it's up to you to look at the log file, TLPD-log.txt in the temp directory, when running in batch mode.

« Last Edit: October 13, 2011, 06:19 PM by MilesAhead »