Revision 966 tmp/org.txm.groovy.core/src/groovy/org/txm/importer/factiva/factivaLoader.groovy

factivaLoader.groovy (revision 966)
154 154
List<File> srcfiles = srcDir.listFiles();
155 155
for (int i = 0 ; i < srcfiles.size() ; i++) {// check XML format, and copy file into binDir
156 156
	File f = srcfiles.get(i)
157
	if (f.getName().equals("import.xml") || f.getName().equals("metadata.csv") || f.getName().endsWith(".properties")) {
157
	if (f.getName().equals("import.xml") || f.getName().matches("metadata\.....?") || f.getName().endsWith(".properties")) {
158 158
		srcfiles.remove(i);
159 159
		i--;
160 160
		continue;
......
175 175
Metadatas metadatas; // text metadata
176 176
println "Trying to read metadata from: "+allmetadatasfile
177 177
if (allmetadatasfile.exists()) {
178
	File copy = new File(binDir, "metadata.csv")
178
	File copy = new File(binDir, allmetadatasfile.getName())
179 179
	if (!FileCopy.copy(allmetadatasfile, copy)) {
180 180
		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
181 181
		return;

Also available in: Unified diff