Directory 1 only contains a bunch of folders that we'll call "Group A". Directory 2 contains the Group A folders in addition to a bunch of other folders we'll call "Group B" [Group B contains no Group A items].
In other words:
D1= A
D2= A+B
What I want to do is delete ONLY Group A folders from Directory 2, while keeping Group B folders intact there. Therefore, Directory 1 will only contain Group A and Directory.
So I want it to come out as:
D1=A
D2=B
There are far too many folders to do this manually. In addition, when I delete Group A in Directory 2, not only the folders but everything inside of the Group A folders must be deleted as well.
How can I accomplish this? Is there a way to create a list of Group A's folders and then somehow use this list as an input for deleting them in Directory 2?
In other words:
D1= A
D2= A+B
What I want to do is delete ONLY Group A folders from Directory 2, while keeping Group B folders intact there. Therefore, Directory 1 will only contain Group A and Directory.
So I want it to come out as:
D1=A
D2=B
There are far too many folders to do this manually. In addition, when I delete Group A in Directory 2, not only the folders but everything inside of the Group A folders must be deleted as well.
How can I accomplish this? Is there a way to create a list of Group A's folders and then somehow use this list as an input for deleting them in Directory 2?