Delete files from a folder based on an existing set of files in another folder
This one I couldn't find a proper answer.
I have 2 folders. One is called 'src', where my java source code is located. The other one is called 'srcGenerated' and has a set of files created by a code generator. srcGenerated is a superset of src.
I want to use both folders as my build path on Eclipse. The problem is the duplicated files in srcGenerated. Since there is no way to supress the generation of files that are already in src, my question is, how to delete the duplicated files in srcGenerated based on the existing set of开发者_如何学Go files from src.
Ant or Powershell script preferred.
May not be the easiest one, but this is what I though of.
You can exclude Java files from srcGenerated that you don't want to be included while building.
Here you can exclude all the files that you don't want to be built. I know, it's painstaking if there are hundreds of conflicting Java files. But it definitely works.
精彩评论