简体   繁体   English

WinMerge:如何递归地比较文件夹名称和文件名?

[英]WinMerge: How to compare folder names and file names only, recursively?

I currently have two main music folders, one is FLAC, ripped from CD, another is MP3, converted from FLAC.我目前有两个主要的音乐文件夹,一个是 FLAC,从 CD 翻录,另一个是 MP3,从 FLAC 转换而来。 Over the years, my primary MP3 collection (in its own folder) has come from various sources, and has become a mess.多年来,我的主要 MP3 收藏(在它自己的文件夹中)来自各种来源,已经变得一团糟。 I apparently messed up some of the FLAC to MP3 conversions too, and appear to be missing .mp3 files in both MP3 folders.我显然也搞砸了一些 FLAC 到 MP3 的转换,并且似乎在两个 MP3 文件夹中都缺少 .mp3 文件。

So, I tried WinMerge to see the differences, but it doesn't appear to be able to compare folder and file names only .因此,我尝试使用 WinMerge 来查看差异,但它似乎无法仅比较文件夹和文件名 It supports recursive folder search, which is nice, but without "names only" filtering, pretty much EVERYTHING looks different when comparing FLAC and MP3 files.它支持递归文件夹搜索,这很好,但没有“仅名称”过滤,在比较 FLAC 和 MP3 文件时,几乎所有东西看起来都不同。 I've reviewed comparison options and app preferences and tried looking online, and I've found nothing yet.我查看了比较选项和应用偏好,并尝试在网上查找,但我什么也没找到。

Maybe WinMerge isn't the best tool for this, but my attempts with other tools have failed, like with WinDiff.也许 WinMerge 不是最好的工具,但我对其他工具的尝试都失败了,比如 WinDiff。 What am I missing, or what should I try?我错过了什么,或者我应该尝试什么?

  1. Open CMD/Shell in each of the folders you want to compare.在要比较的每个文件夹中打开 CMD/Shell。
  2. Run tree /F . > tree.txt运行tree /F . > tree.txt tree /F . > tree.txt in the CMD, that will export the folder and file structures to a plaintext file named tree.txt under dir (If you wanna compare the folder only, just remove the /F param). tree /F . > tree.txt ,这会将文件夹和文件结构导出到 dir 下名为tree.txt的纯文本文件(如果您只想比较文件夹,只需删除/F参数)。
  3. Open WinMerge, compare these plaintext files instead of the concrete directories.打开 WinMerge,比较这些纯文本文件而不是具体目录。

PS: PS:

  1. There will be some differences at the head of files, but it is easy to distinguish.文件头部会有一些差异,但很容易区分。
  2. Make sure you run the command in the exact directory for comparison, if you get the structure of parent/sub folder, the result of comparison will be in complete shambles.确保您在确切的目录中运行命令进行比较,如果您获得父/子文件夹的结构,比较结果将完全混乱。
  3. Remember to delete the file after comparing if you don't need it anymore.如果您不再需要它,请记住在比较后删除该文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在目录树中递归地将所有文件和文件夹名称中的所有空格替换为下划线? - How to replace all spaces by underscores in all file and folder names recursively in a directory tree? 如何比较目录中的文件名和文本文件中的文件名? - How to compare file names in directory with file names in a text file? 如何使用Windows命令行在文件夹中的文件名中添加差异前缀(从文本文件中读取前缀名称)? - How to add diffrent prefix to file names in a folder using Windows command line (reading prefix names from textfile)? 如何在 python 中检查平台不兼容的文件夹(文件)名称 - how to check for platform incompatible folder (file) names in python 如何在文件夹的所有文件名中用下划线替换所有空格? - How to replace all spaces by underscores in all file names of a folder? 如何使用Windows命令行获取已删除的临时文件名列表和只读文件名列表? - How to get the deleted temp file names list and read only file names list using windows command line? 仅Xcopy某些文件名 - Xcopy certain file names only Windows的禁用文件和文件夹名称的完整列表 - Complete List of forbidden file and folder names for windows Windows文件夹名称转换为excel输出文件 - Windows folder names to excel output file 在文件夹中文件名的开头添加序号 - Add sequential numbers to the beginning of the file names in folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM