I'll see if we can improve this type of linking so it dynamically detects new files and deletes broken links. In the meantime, here's a script that deletes broken links for a project. You can either execute it from jAlbum's system console window (F7) or place it in a file called "Delete broken links.groovy" that you place in a "tools" folder within jAlbum's "config" folder (See Tools-Open directories-Config directory):
Work work = Work.on(rootFolder.descendants)
.titled("Delete broken links")
.inform("This script deletes broken links from this project")
.filter(ao) -> { ao.Category != Category.webPage && ao.link && !ao.file.exists() }
.forEach(ao) -> {
println(ao);
ao.delete();
}
.execute(work) -> {
// Refresh display
explorer.context.viewFolder(explorer.context.currentFolder);
window.statusBar.setText("Processed ${work.processed} objects");
}
.showResult();