Suppose Directory1 has
1.File1
2.File2
3.Subdirectory1
Subdirectory1 has :
3.1. File 3
3.2. File 4
and
Directory2 has
1.File1
2.File3
3.Subdirectory1
Subdirectory1 has :
3.1. File 3
3.2. File 6
If any file is uniquely present in Directory2 it has to be deleted. If the file is present in both Directory1 and Directory2 , files in Directory1 has to be copied to Directory2 with the same folder structure [Updates].