Count the Number of Characters in a Full FIle Path?

Posted by Richie086 on Super User See other posts from Super User or by Richie086
Published on 2012-11-08T21:37:26Z Indexed on 2012/11/09 23:06 UTC
Read the original article Hit count: 240

Filed under:
|
|
|

I need to be able to count the number of characters in a full path to a file in windows. How I am currently accomplishing this task is as follows:

  1. Open a command prompt
  2. cd to the directory in question (for example c:\CruiseControl\ProjectArtifacts\ProjectName)
  3. type the following command dir /s /b > output.csv
  4. Open the resulting output.csv file in excel.
  5. use the =LEN() function in excel to count the number of characters per row as listed in the output.csv file.

Does anyone know of an explorer shell extension, or some 3rd party tool that could preform this function without me having to manipulate the output from dir in excel? Is there some easier way to go about doing this? The root of the issue I am having is the ~260 character file path limit in Windows. I am trying to analyze which paths are approx ~260 characters so I can shorten them to avoid getting this error.

© Super User or respective owner

Related posts about Windows

Related posts about batch