Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I created <a href="https://github.com/deadlydog/PathLengthChecker" rel="nofollow noreferrer">the Path Length Checker tool</a> for this purpose, which is a nice, free GUI app that you can use to see the path lengths of all files and directories in a given directory.</p> <p>I've also <a href="http://blog.danskingdom.com/powershell-script-to-check-path-lengths/" rel="nofollow noreferrer">written and blogged about a simple PowerShell script</a> for getting file and directory lengths. It will output the length and path to a file, and optionally write it to the console as well. It doesn't limit to displaying files that are only over a certain length (an easy modification to make), but displays them descending by length, so it's still super easy to see which paths are over your threshold. Here it is:</p> <pre><code>$pathToScan = "C:\Some Folder" # The path to scan and the the lengths for (sub-directories will be scanned as well). $outputFilePath = "C:\temp\PathLengths.txt" # This must be a file in a directory that exists and does not require admin rights to write to. $writeToConsoleAsWell = $true # Writing to the console will be much slower. # Open a new file stream (nice and fast) and write all the paths and their lengths to it. $outputFileDirectory = Split-Path $outputFilePath -Parent if (!(Test-Path $outputFileDirectory)) { New-Item $outputFileDirectory -ItemType Directory } $stream = New-Object System.IO.StreamWriter($outputFilePath, $false) Get-ChildItem -Path $pathToScan -Recurse -Force | Select-Object -Property FullName, @{Name="FullNameLength";Expression={($_.FullName.Length)}} | Sort-Object -Property FullNameLength -Descending | ForEach-Object { $filePath = $_.FullName $length = $_.FullNameLength $string = "$length : $filePath" # Write to the Console. if ($writeToConsoleAsWell) { Write-Host $string } #Write to the file. $stream.WriteLine($string) } $stream.Close() </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload