Also, when running jAlbum from the UI or command line, jAlbum will execute the "finally.bsh", "finally.js" or "finally.groovy" scripts if found within the skin's directory or within <progdir>/system. The file extension of these scripts will determine what language you'll be using (Java/BeanShell, JavaScript or Groovy).
Here's an attached example that copies the generated album (if generated ok) to the user's desktop and names the destination album folder the same as the image folder. It also tries to execute an external bat file, passing the path to the generated album as argument. I'd personally stay within jAlbum's scripting framework to do any post album build actions.
finally.bsh:
/**
* This script is executed after each album build
*/
import se.datadosen.jalbum.*;
if (executedNormally) {
// Copy the generated directory to the user's desktop
File desktop = new File(System.getProperty("desktop.path"));
File dest = new File(desktop, rootFolder.getName());
IO.copyDirectoryContent(rootOutputDirectory, dest, true);
window.messageBox("All went ok. Album copied to: " + dest);
// Call batch file and pass it generated album directory
try {
Runtime.getRuntime().exec(new String[] { "finally.bat", rootOutputDirectory.getAbsolutePath()});
} catch (IOException ex) {
// Do nothing. Script not found
}
}