I'm trying to generate a list of all known files on a file share with Attributes Archive
and Offline
.
But I keep running into PathTooLongException
errors.
So far I've only found that Robocopy can work past the file length errors except that I can't get the same sort of "these attributes only" sort of results.
Example:
Get-ChildItem -Attributes A+O -Recurse |Export-Csv E:\temp\StubSearchCorp.csv
Gives:
Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. At line:1 char:1 + Get-ChildItem -Attributes A+O -Recurse |Export-Csv E:\temp\StubSearchA.Corp.cs ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ReadError: (F:\Corporate\...e A Train & Ship:String) [Get-ChildItem], PathTooLongException + FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand
Is anyone aware of a way I can export to CSV a list like this?