@Override
	public void run()
	{

		File dirFile = null;
		for (final String target : this.targetDir) {
			dirFile = new File(target);
			this.addDirNode(this.document.getRootElement(), dirFile);
		}

		final Format form = Format.getPrettyFormat();
		form.setOmitDeclaration(true);
		form.setEncoding("UTF-8");

		final XMLOutputter xmlOutput = new XMLOutputter(form);

		final Timestamp currentTimestamp = new java.sql.Timestamp(Calendar
				.getInstance().getTime().getTime());

		File output = null;
		if (this.targetDir.length == 1) {
			output = new File(this.outputDir + dirFile.getName()
					+ ".rsCollection");

			if (output.exists()) {
				output = new File(this.outputDir + dirFile.getName() + "."
						+ currentTimestamp.getTime() + ".rsCollection");
			}
		} else {
			output = new File(this.outputDir + "Mixed Collection.rsCollection");

			if (output.exists()) {
				output = new File(this.outputDir + "Mixed Collection."
						+ currentTimestamp.getTime() + ".rsCollection");
			}
		}
		try {
			final FileOutputStream fos = new FileOutputStream(output);
			xmlOutput.output(this.document, fos);
			fos.close();
		} catch (final IOException e) {
			e.printStackTrace();
		}

		for (final String s : this.targetDir) {
			this.listModel.set(this.listModel.indexOf(s), s + " - (DONE)");
		}
	}