在 Windows 10 中,我想从不同硬盘上的 WinMerge 比较中排除回收站文件(硬盘可能会从计算机中添加或删除,因此理想情况下驱动器号应该是任意的。)
按照手册(http://manual.winmerge.org/Filters.html)
我试过(文件名:RecycleBin.flt,位于正确的文件夹中)
## This is a directory/file filter for WinMerge
name: RecycleBin
desc: Recycle bin
## This is an inclusive filter
## (Includes everything except items matching the specified rule. )
def: include
^\\$RECYCLE.BIN\
我还尝试了 ^\$RECYCLE.BIN\ 的多种变体,例如
^\\\$RECYCLE.BIN\
f:\$RECYCLE.BIN\
F:\\$RECYCLE.BIN
F:\\\$RECYCLE.BIN
这些都不起作用。
答案1
我知道这个问题已经问了很久了,但下面是让它工作的方法。您必须使用反斜杠作为文件夹名称中 $ 和 . 的转义字符。希望对您有所帮助!
## This is a directory/file filter template for WinMerge
name: Ignore Recycle Bin
desc: Ignore the Recycle Bin folder when comparing folders
## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
def: include
## Filters for filenames begin with f:
## Filters for directories begin with d:
## (Inline comments begin with " ##" and extend to the end of the line)
##f: \.ext$ ## Filter for filename
d: \$RECYCLE\.BIN ## Filter for directory
```````
Regards,
Jeff