|Working on a batch file from past few days but no luck yet.|
I am in need of a script that will compare an XML file with a folder and shall delete nonidentical files from the folder whose file names are not mentioned in the XML file.
i.e, I want to keep the files which are there in the build list(XML) and delete the rest from the folder.
For Eg: I have a folder named D:\123 which has around 15 files in it. I have a build list (XML file) which has 10 filenames which are there in D:\123. Now I want a batch file script which will delete the rest 5 files from D:\123 which is not there in the xml file.
XML file looks like (BuildList.XML):
The batch file must be able to compare BuildList.XML with D:\123 and its subfolders, for instance - D:\123\subfolder1 and D:\123\subfolder2. Keep the identical files and DELETE nonidentical files from the folder D:\123\subfolder1 or 2.
Any help will be highly appreciated!