Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

List Folders & Subfolders with Folder Path over 240 in length

$
0
0

I need to modify my script to catch output  or get past the Max_Path of 248 character limit in a folder path,  and will need to dump the catch into a text file .

Here is what I have so far and works great if it is under 248 path length.

 

get-childitem J:\Lab -recurse | where {$_.PSiscontainer -eq $true} | select FullName, length | foreach {
    
if ($_.FullName.length -gt 245 ){ Write-Host $_.FullName.Length, $_.FullName

      }
  }

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles