分析一个或多个目录中的所有文件并管理重复文件(具有不同名称的相同文件)
项目描述
介绍
此应用程序可以帮助您清理文件系统中的重复文件。这里的重复文件指的是: 两个或多个文件具有相同的内容,但可以有不同的名称。
您可以使用它这样
Usage: duplicatefinder.py [options] [directories] Analyse all files in one or more directories and manage duplicate files (the same file present with different names) Options: --version show program's version number and exit -h, --help show this help message and exit -a ACTION, --action=ACTION choose an action to do when a duplicate is found. Valid options are print,rename,move,ask; print is the default -r, --recursive also check files in subdirectories recursively -p PREFIX, --prefix=PREFIX prefix used for renaming duplicated files when the 'rename' action is chosen. Default is "DUPLICATED" -m PATH, --move-path=PATH the directory where duplicate will be moved when the 'move' action is chosen -v, --verbose more verbose output -q, --quiet do not print any messages at all Filters: Use those options to limit and filter directories and files to check. Options belowe that rely on file or directory name support usage of jolly characters and can also be used multiple times -s MIN_SIZE, --min-size=MIN_SIZE indicate the min size in bytes of a file for being checked. Default is 128. Empty file are always ignored --include-dir=INCLUDE_DIR only check directories with this name --exclude-dir=EXCLUDE_DIR do not check directories with this name --include-file=INCLUDE_FILE limit the search inside file with that name --exclude-file=EXCLUDE_FILE ignore the search inside file with that name Report bugs (and suggestions) to <luca@keul.it>.
待办事项
增加更多测试覆盖率(也许可以将一些测试合并在一起)。
控制递归最大深度。
国际化(至少意大利语)。
添加“移动到回收站”操作(依赖trash-cli可能是一个好主意)。
发布为Debian/Ubuntu/Kubuntu软件包(我真的很喜欢这个)。
致谢
感谢Lord Epzylon提供一些代码和修改。
Subversion和其他
SVN仓库托管在Keul的Python库
变更日志
0.3.0
可执行脚本的名称已更改为duplicatefinder.py。
现在您可以将多个目标目录作为参数传递。
添加了–action=ask选项,以便在每次遇到重复文件时选择执行的操作(交互模式)。
添加了 –include-dir 选项,以限制搜索仅限于特定目录。
添加了 –exclude-dir 选项,以跳过某些目录的搜索。
添加了 –include-file 选项,以在搜索中仅匹配某些文件。
添加了 –exclude-file 选项,根据文件名跳过搜索中的文件。
未处理使用错误的目录名称,但仅产生异常终止。
更友好地处理用户 break (CTRL+C) 的操作。
添加了 –verbose 选项,以打印更多消息信息。
添加了 –quiet 选项,不输出任何内容。
删除了 _same_file 函数。Python 已经有 filecmp 模块(希望这更快)!
添加了用于自动化测试的环境和测试(使用 –action=tests)。
对命令行帮助的一些修复。
0.2.0
添加了 move 动作。
添加了 –recursive 选项,以遍历整个文件夹树(感谢 Lord Epzylon)。
添加了 –min-size 选项,以指定要检查的文件的最小大小。
0.1.2
setup.py 中存在一个糟糕的虫子。代码是好的,但 0.1.1 egg 无法安装。感谢无处不在的 A. Jung。
0.1.1
修复了 setup.py 脚本。
添加了文档信息。
第一个 egg 正式版本。
0.1.0 - 未发布
第一个(未)发布
项目详情
下载文件
下载适合您平台文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。