XYplorer 颜色过滤器
基础
Color Filters are defined by a selector and a pattern in the general form selector: pattern
. The following selectors (= filter types) are available:
滤色器由选择器和模式定义,一般形式为 selector: pattern
。可以使用以下选择器(= 过滤器类型):
Filter Type Selector 2nd Selector
----------------------------------------------
Name [name:]
Folder Name dir:
Attributes attr:
Size size:
Date Created dateC:
Date Modified dateM:
Date Accessed dateA:
Age Created ageC:
Age Modified ageM:
Age Accessed ageA:
Name Length len:
Title Length lenT:
Property prop: property selector:
Examples:
name: *.txt = named *.txt (命名为*.txt)
dir: *.txt = folder named *.txt (名为 *.txt 的文件夹)
attr: system = SYSTEM attribute set (系统属性集)
size: >= 1.5 GB = 1.5 GB or bigger (1.5 GB 或更大)
dateM: 2010.01.01 - = modified 2010 or later (2010 年或之后修改)
dateC: dw 6-7 = created on a weekend (在周末创建)
ageA: < 5 d = accessed less than 5 days ago (访问时间少于 5 天)
len: > 260 = path/name longer than 260 characters (路径/名称长度超过 260 个字符)
prop:dimensions: 1500 x * = 1500 pixels wide (1500 像素宽)
len:>=260 //overlong filenames>FFFFFF,D94235
len:>=260
:这是一个条件,指定文件名长度大于或等于260个字符。在Windows系统中,通常建议避免使用过长的文件名,因为它们可能会导致某些程序或操作出现问题。XYplorer通过这个条件帮助用户快速识别出这些可能的问题文件。
//overlong filenames
:这是一个注释,用于说明这个规则的目的。它不会影响规则的功能,只是为了帮助用户理解这个规则是用来做什么的。在这个例子中,注释说明了这个规则是用来标记过长文件名的。
>FFFFFF,D94235
:这部分指定了满足上述条件的文件或文件夹应该显示的颜色。第一个字体色,第二个背景色。
attr:junction>D500D5
attr:system>FF0000,FFFF80
attr:encrypted>008000
attr:compressed>0000FF
这些规则根据文件的属性(如连接点、系统文件、加密、压缩)来分配颜色
ageM: <= 30 n //modified in the last 30 mins>FFFF80,5C9E1B
ageM: d //modified today>FFFFFF,74C622
attr:d>5E738C
//空文件
size:0 //empty files>4199E0,E0E2ED
//空文件夹
B:prop:#empty:2|fl //empty folders>A3A4A7,DCE4E9
//没有子文件夹
L:prop:#nosubs:2 //folders without subs>5382D9
-
B:prop:#empty:2|fl
:这部分看起来是指定属性的条件。B:
可能是一个指示符,表明这个规则适用于文件夹(在XYplorer中,B
通常代表文件夹)。prop:#empty:2
似乎是一个属性检查,可能是检查文件夹是否为空。但是,通常XYplorer的属性检查不会以prop:
开头,这可能是自定义属性或其他插件提供的功能。|fl
可能是另一个条件或修饰符,但在标准的XYplorer规则中,这样的语法并不常见。它可能是用来进一步指定文件夹类型的,比如只针对文件夹(folders)。
//扩展名
*.exe;*.bat>D24257
*.htm;*.html;*.php>4287D2
*.txt;*.ini>38A050
*.png;*.jpg;*.gif;*.bmp>933968
*.zip;*.rar>CC6600
*.dll;*.ocx>7800F0
*.mp3;*.wav>FF8000
Scope suffixes are appended to the primary selector separated by a space. "d" stands for "directories", "f" stands for "files", "df" (or "fd") for both (i.e. unlimited scope). A missing scope suffix defaults to "df" (unlimited scope) but see some obvious exceptions below.
作用域后缀追加到主选择器,并用空格分隔。“d”代表“目录”,“f”代表“文件”,“df”(或“fd”)代表两者(即无限范围)。缺少的作用域后缀默认为“df”(无限作用域),但请参阅下面的一些明显例外情况。
d 目录
f 文件
df/fd 代表两者(缺省)
Color-coding based on file date (date:) - Part 1: Absolute
基于文件日期(date:)的颜色编码 - 第 1 部分:绝对日期
Dates All three file dates (Created, Modified, Accessed) are supported. So you can, for example, color all files that were
modified on a certain day, or that were created before the year 2008.
支持所有三个文件日期(“创建”、“修改”、“访问”)。因此,例如,您可以为在某一天修改或在 2008 年之前创建的所有文件着色。
General syntax:
dateC: = Date Created
dateM: = Date Modified
dateA: = Date Accessed
dateM: [date] = exact date (down to the second)
dateM: == [date] = exact date (down to the second)
dateM: < [date] = earlier than
dateM: > [date] = later than
dateM: <= [date] = same or earlier
dateM: >= [date] = same or later
dateM: [date] - [date] = from earliest to latest (both inclusive)
dateM: [date] -< [date] = from earliest to latest (latest exclusive)
dateM: [date] >- [date] = from earliest to latest (earliest exclusive)
dateM: [date] >< [date] = from earliest to latest (both exclusive)
dateM: [date] - = same or later (same as >= )
dateM: - [date] = same or earlier (same as <= )
Examples with time part:
dateM: == 2010.11.16 10:30:12 (all items modified then)
dateA: >= 11.11.2010 11:11:11 (all items accessed in this Carnival and later)
Examples without time part:
dateC: < 2008.01.01 (all items created before 2008)
dateM: 2010.01.01 - (all items modified 2010 and later)
dateM: 2010.11.14 - 2010.11.15 (all items modified 2010.11.14 or 2010.11.15)
dateC: 05/22/2011 (all items created 05/22/2011)
Notes:
The date has to be given in a form that is recognized as a valid date format on your locale.
日期必须以在您的区域设置中被识别为有效日期格式的形式给出。
The time part can be skipped. In this case, when operators are used in the term, the time it is internally set to 00:00:00 or 23:59:59, depending on the semantics of the term. When no operators are used (you just give a date without the time part) the term is interpreted as a time range covering that whole day (see examples above).
可以跳过时间部分。在这种情况下,当在术语中使用运算符时,根据术语的语义,在内部将其时间设置为 00:00:00 或 23:59:59。当不使用运算符时(您只给出一个没有时间部分的日期),该术语被解释为涵盖该整天的时间范围(请参阅上面的示例)。
The selector is not case-sensitive:
DaTem:
would work as well.date:
= defaults to "Date Modified".选择器不区分大小写:
DaTem:
也可以工作。date:
= 默认为“修改日期”。A trailing ";" is optional. Like with all color filters, ";" can also be used to concatenate patterns assigned to the same colors.
尾随的“;”是可选的。与所有颜色滤镜一样,“;”也可用于连接分配给相同颜色的图案。
These filters work for files and folders but only in the List (not in the Tree).
这些筛选器适用于文件和文件夹,但仅适用于“列表”(不在“树”中)。
Color-coding based on file date (date:) - Part 2: Subranges
基于文件日期 (date:
) 的颜色编码 - 第 2 部分:子范围
You also can color items if their file times match certain subranges, e.g. created from 8:00-10:00 in the morning, last modified on a weekend, last accessed in an April (of any year). To achieve this a unit selector is prefixed to a number or range (using the usual set of operators).
如果项目的文件时间与某些子范围匹配,例如,在早上 8:00-10:00 之间创建,上次修改在周末,上次访问时间在 4 月(任何一年),您也可以为项目着色。为了实现这一点,单位选择器以数字或范围为前缀(使用通常的运算符集)。
Unit selectors:
y = year (1601 - 32767)
q = quarter of year (1 - 4)
m = month (1 - 12)
dw = day of week (Monday = 1 ... Sunday = 7)
dy = day of year (1st January = 1)
d = day (of month)
h = hour (0 - 23)
n = minute (0 - 59)
s = second (0 - 59)
ms = millisecond (0 - 999)
Examples:
dateC: h 8-10 = created from 8:00-10:00 (of any day)
dateM: m 4 = last modified in an April (of any year)
dateM: dw 6-7 = last modified on a weekend 最后修改时间:周末(6-7)
dateM: dw 7-2 = last modified from sunday to tuesday 最后修改时间从星期日到星期二
dateC: dy 1-100 = created in the first 100 days (of any year) 在任何一年前 100 天创建
dateC: q 3 = created in the 3rd quarter (of any year) 创建于任何一年第三季度
Note:
单位选择器必须与单位编号或范围至少相隔一个空格。
Color-coding based on file age (age:)z
基于文件期限的颜色编码 (age:)
All three file dates (Created, Modified, Accessed) are supported. You can, for example, color all files that were modified today or last week, or that were created more than 10 years ago. This filter also supports folders in the folder Tree. General syntax:
支持所有三个文件日期(“创建”、“修改”、“访问”)。例如,您可以为今天或上周修改的所有文件或 10 多年前创建的文件着色。此筛选器还支持文件夹 Tree 中的文件夹。
ageC:= 创建日期
ageM:= 修改日期
ageA: = 访问日期
通常的运算符适用;[n] 是一个数字,[u] 是一个单位选择器。柜台和单元之间必须有一个空格!例如:
ageM:[n] [u] = 特定单位
ageM: == [n] [u] = 特定单位
ageM:< [n] [u] = 小于这么多单位
ageM:> [n] [u] = 超过这么多单位
ageM:<= [n] [u] = 如此多的单位或更少
ageM:>= [n] [u] = 如此多的单位或更多
ageM:[最小值] - [最大值] [u] = 从最小值到最大值单位(均包括在内)
单位选择器:
y = 年
q = 年度季度
m = 月
w = 周(周一至周日)
d = 天 [默认单位]
h = 小时
n = 分钟
s = 秒
例子
ageM: < 5 n = 修改时间少于 5 分钟
ageM: >= 3 h = 3 小时或更长时间前修改
ageM: 1 w = 上周修改 (上周一 - 周日)
ageM: 0 d = 今天修改 (从 00:00:00 到 23:59:59)
age: = 今天修改(同上,所有默认值均使用)
ageM: 1 d = 昨天修改
ageM: < 0 d = 将来修改(明天或以后)
Note:
· 单位选择器必须与单位编号或范围至少相隔一个空格。
· 年龄选择器不区分大小写:AgEm:
也可以使用。
· age:
默认为“修改日期”。