Tuesday, October 22, 2013

Find long folder file dir directory names


Dir /b /s > Test.csv

/b : Lists each directory name or file name, one per line, including the file name extension. /b does not display heading information or a summary. /b overrides /w.
/s : Lists every occurrence, in the specified directory and all subdirectories, of the specified file name



Open Test.csv in excel and add this to col B    =len(A1) and sort largest  to smallest B.
Could use excel and use \ as delimiter to Get long file names.
 http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/dir.mspx?mfr=true

Windows usually limits file names to 260 characters. But the file name must actually be shorter than that, since the complete path (such as C:\Program Files\filename.txt) is included in this character count.
It depends on the length of the complete path to the file (such as C:\Program Files\filename.txt). Windows limits a single path to 260 characters.
This helps us understand why a folder can be a maximum of 244 characters, from the defined 260 length of MAX_PATH as follows:
 260 minus C:\ (3) minus <NUL> (1) = 256
 256 minus 8.3 file name (12) = 244

No comments: