Published on AnalogDuck.com (http://www.analogduck.com/blog)

Finding filepaths greater than 255 characters on your system

By AnalogDuck
Created 2005-12-13 20:10

This guy [1] provides a very good solution for detecting filenames & paths longer than the Windows maximum of 255 characters. For whatever reason, many portions of the OS allow you to create filenames and paths in great excess of this, but many/most other portions of the OS and its hosted applications bomb out over these paths.

The Windows batch file which does the job (requires the GNU flavour of sed [2]):

dir %1 /B /S | c:\No_Install\sed3028\sed -n '/^.\{255\}/p' > c:\filepaths_greater_than_255_characters.txt
start c:\filepaths_greater_than_255_characters.txt


Source URL:
http://www.analogduck.com/blog/blog/node/415