Fra*_*urt 7 windows-7 windows-explorer sorting
文件按大小而不是文件夹排序,所以我想知道 Windows 资源管理器在显示它们时如何决定文件夹的顺序。我使用 Windows 7 SP1 x64 Ultimate。
按大小排序的示例:
实际上,大多数SearchResults文件夹的“热门结果”视图(默认)中的主要排序是对dislpay 隐藏的属性:System.Search.Rank。这可以通过检查以下定义的各种 TopView 来验证:HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes
$FTPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes'
### Dictonary FolderTypeID -> FolderType.CanonicalName
$FTKey = Get-Item $FTPath
$FT_Lookup = $FTKey.GetSubkeyNames() | ForEach{ $hash = @{'{25CC242B-9A7C-4F51-80E0-7A2928FEBE42}'='Network'} } {
$hash.Add( $_, $FTKey.OpenSubkey($_).GetValue('CanonicalName') )
} { $hash }
gci $FTPath |
? { $_.GEtValue('CanonicalName') -match 'SearchResults' } -PipelineVariable FType |
gci -Path { Join-Path $_.PSPath TopViews } | gp | ? Order -eq 0 |
Select @{ 'N' = 'FolderType' ; E = { $FT_Lookup[$FType.PSChildName] }} , SortByList
FOlderType SortByList
---------- ----------
Contacts.SearchResults prop:System.ItemNameDisplay;-System.DateModified
Documents.SearchResults prop:-System.Search.Rank;-System.DateModified;System.Ite...
OtherUsers.SearchResults prop:-System.Search.Rank;-System.DateModified;System.Ite...
Pictures.SearchResults prop:-System.Search.Rank;-System.ItemDate;System.ItemNam...
Communications.SearchResults prop:System.Contact.FileAsName;-System.Message.DateRecei...
UsersLibraries.SearchResults prop:-System.Search.Rank;-System.DateModified;System.Ite...
Music.SearchResults prop:-System.Search.Rank;-System.DateModified;System.Ite...
Generic.SearchResults prop:-System.Search.Rank;-System.DateModified;System.Ite...
PublishedItems.SearchResults prop:-System.Search.Rank;System.ItemNameDisplay;-System....
UserFiles.SearchResults prop:-System.Search.Rank;-System.DateModified;System.Ite...
Videos.SearchResults prop:-System.Search.Rank;-System.ItemDate;System.ItemNam...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1131 次 |
| 最近记录: |