windows分组排序方式
约 295 字小于 1 分钟
vbs脚本
Dim Shell
Set Shell = CreateObject("Shell.Application")
For Each window In Shell.Windows()
If LCase(Right(window.FullName,13)) = "\explorer.exe" Then
window.Document.CurrentViewMode = 1
'设置查看方式为缩略图
window.Document.IconSize = 48
'设置图标尺寸为 48
window.Document.SortColumns = "prop:-System.DateModified;"
'设置排序方式为按修改日期逆序排列
window.Document.GroupBy = "System.DateModified"
'设置分组依据为修改日期
window.Document.SelectItemRelative(0)
'选中一个比较帅的文件
MsgBox "标题: " & window.LocationName & vbCrLf &_
"路径: " & Replace(Mid(window.LocationURL,9),"/","\") & vbCrLf &_
"选中: " & window.Document.SelectedItems().Count & " 个文件/文件夹"& vbCrLf_
Exit For
End If
Next
Document.CurrentViewMode
- 1、2、5、7 缩略图
- 3、列表
- 4、详细信息
- 6、平铺
- 8、内容
Document.IconSize 设置任意大小
- 16 小图标
- 48 中等图标
- 96 大图标
- 256 超大图标
Document.SortColumns(-为逆序,如 prop:System.ItemNameDisplay; 和 prop:-System.ItemNameDisplay; 是相反的顺序)
- prop:System.ItemNameDisplay; 名称
- prop:System.DateModified; 修改日期
- prop:System.ItemTypeText; 类型
- prop:System.Size; 大小
Document.GroupBy 分组
- System.ItemNameDisplay 名称
- System.DateModified 修改日期
- System.ItemTypeText 类型
- System.Size 大小
- System.Null (无)