Get -ChildItem length error

392 Views Asked by At

I've to search Search_String Present in All_Files/Folder/Sub_Folder on particular drive so I've below command, but it is giving me error for some of the folder/Files where Length because Must be Less than 260 characters, and the directory name must be less than 248 characters

Command :

Get-ChildItem D: -Recurse | Where-Object {(Select-String -InputObject $_ -Pattern "Search_String" -Quiet) -eq $true} | ForEach-Object {Write-Output $_} 

I've tried Get-AlphaFSChildItems instead of Get-ChildItem but it didn't work.

https://gallery.technet.microsoft.com/Get-AlphaFSChildItems-ff95f60f

Please help me to find the way-out.

0

There are 0 best solutions below