Beyond Compare 3 has an option in the View menu (Ignore Folder Structure) that does exactly what you want. It iterates over all of the subfolders for every file and displays them in a single level with files aligned based on names. If there happen to be multiple files with the same name it will give priority to aligning ones with the same directory structure.
Compare two different directories for same file
-
16-01-2022 - |
Pergunta
Is there any tool, which can compare 2 directories( with different sub dirs) for same named files?
Eg. DirA has subdir DirA1, DirA1 has one file named file.cpp.
DirB has file.cpp.
Dira->DirA1->file.cpp and DirB->file.cpp.
So, iF i compare these 2 dirs with BC, BC doesnt compare these 2 files. It'll mark them as orphans on both sides.
Can we write any BC script to compare these two files?
PS: I could have 10-100 files in both folders to compare. The point is how to make the comparison tool look for matching file names, irrespective of dir level.
I hope my question makes sense here.
Solução
Outras dicas
Short of writing scripts, here's quick and dirty way to achieve that:
- Create two temporary directories -
FlatA
andFlatB
. - Zip both original directories
DirA
andDirB
into separate zip files -ArchiveA.zip
andArchiveB.zip
- Unzip both archives into
FlatA
andFlatB
respectively, without paths. - Use BeyondCompare to compare "flattened" folders
FlatA
andFlatB
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow