compare folder names
by overlord73 from LinuxQuestions.org on (#4YC5H)
Hi,
I'm searching for a solution to compare only subfolder names of 2 directories. Means there are 2 folders X and Y with the structure:
X
\folder1\title1\
\FOLDER1\title2\
\folder2\titl3...\
Y
\folder1\2019-title1\...
\folder1\2018-title2\...
\folder1\2017-title3\...
the files therein are mediafiles like movies and music, so I want to compare the main foldername (caseinsensitive) and then look at the subfolders, if there is a name with exactly equal title, dont considering the year or other delimiters.
I tried with diff/kdiff, but this is not very handy.
tree dir1 > out1
tree dir2 > out2
diff out1 out2
any ideas?


I'm searching for a solution to compare only subfolder names of 2 directories. Means there are 2 folders X and Y with the structure:
X
\folder1\title1\
\FOLDER1\title2\
\folder2\titl3...\
Y
\folder1\2019-title1\...
\folder1\2018-title2\...
\folder1\2017-title3\...
the files therein are mediafiles like movies and music, so I want to compare the main foldername (caseinsensitive) and then look at the subfolders, if there is a name with exactly equal title, dont considering the year or other delimiters.
I tried with diff/kdiff, but this is not very handy.
tree dir1 > out1
tree dir2 > out2
diff out1 out2
any ideas?