I have a script that copies files from one folder structure to another folder with different structure.
ex. Folder 1
c.txt
d.txt
subdir1
a.txt
b.txt
Script copies files/dirs from Folder 1 to Folder 2(Folder 2 has different structure) in this format
Folder 2
subdir2
c.txt
d.txt
subdir1
a.txt
b.txt
In folder 2 i can create my own files like new1.txt, new2.txt. After creating new files the folder 2 structure will be something like this:
Folder 2
new1.txt
new2.txt
subdir2
c.txt
d.txt
subdir1
a.txt
b.txt
Now i need to compare the directory content of Folder1 and Folder2. I am using filecmp.dircmp for comparing directory content. filecmp.dircmp on these two folders will give me subdir2, subdir2/c.txt, subdir2/d.txt as new directory and new files with new1.txt and new2.txt. But actually i have only created new1.txt and new2.txt as new files and the other files only copied from one folder to different folder.
As a new files i need only new1.txt and new2.txt in result. Any idea how can i do it. I am writing this code in python