About:
This Script AddIn adds a new command, BulkMeta, to DOpus. It started life as Image Meta but has been enhanced to deal with additional file types.
This command opens a dialog which allows a number of editing options (Find & Replace, Append, Prefix, Replace, Clear, File Name and Parent Name) for several file types (Images, Audio and PDF).
Caution: There is no undo function. By default, all files will be backed up prior to any metadata being written. Backups can be located in the recycle bin once the script dialog has closed.
History:
Older History
- 1.0 (14/5/20)
- Initial Release.
- 1.0.1 (15/5/20)
- Added: Tags metadata to all categories.
- Added: Popup menu to file list.
- Added: Double click an item in the file list to use the filename in the edit box.
- 1.0.2 (15/5/20)
- Added: new options to popup menu.
- Added: new config option to toggle confirmation dialog when writing metadata.
- Fixed: Initial right clicking of an item in the listview would fail.
- Fixed: Display error when changing modes.
- 1.0.3 (16/5/20)
- Fixed: Logical error identified and resolved by @SBond - thanks.
- 1.0.4 (16/5/20)
- Added: From a suggestion by @Leo, optionally, now backs up all files prior to writing metadata.
- 1.1 (17/5/20)
- Added: Open/Show, Copy to, and Properties to popup menu.
- Added: Default double click configuration - Show, Open, Properties or Use Filename.
- Added: Configuration option copy_folder - destination of "Copy to ..." option in popup menu.
- 1.1.1 (17/5/20)
- Added: Optionally log all metadata changes to a text file.
Current Version:
- 1.2 (19/5/20)
- Added: Log Reader dialog for easy viewing of the log file.
- Changes made to the log file format to allow for parsing in the Log Reader.
Installation:
- Download: Bulk Meta 1.2.js.txt (47.0 KB)
- Drag the .js.txt file to Preferences / Toolbars / Scripts.
Usage:
- Download: Bulk Meta.dcf (259 Bytes)
- Select "Settings / Customize Toolbar..." from your Lister and then drag the button file to any toolbar you like.
Select as many files as you would like and click the Bulk Meta button. The script will sort through all selected files and only include valid filetypes based on the command line arguments you used. If no arguments are given, the dialog will open showing only Images and the dialog will be in Clear mode.
You can change Categories after the dialog has opened - the script will re-read the list of selected files and import only those matching the new category. Once you've finished making your edits, click Ok to save the changes. Cancel will close the dialog and write nothing to your files.
The script has several configuration options in the Preferences / Toolbars / Scripts page:
- log_changes: Write a log file detailing all metadata changes made.
- log_folder: Destination folder for the log file.
- backup_files: Backup the files before writing any metadata.
- confirm_write: Asks for confirmation before any metadata is changed.
- copy_folder: Destination folder for the copy to function.
- dblclk_action: Choose the default action for double clicking files in the list.
- remember_position: The dialog will remember it's last used size and position.
If backup_files is set to true then when you click Ok to write your metadata changes, the script will backup all files to a new folder in /temp. The new folder will be named: .bulkmeta and will have the date and time appended. This folder will be deleted once the script is complete, leaving your backup in the recycle bin.
Optionally, a log file can be created detailing all metadata changes made. This log file will be appended with subsequent uses of Bulk Meta, leaving a permanent record of your usage (each time the log entries will be prefaced with the Date and Time). The log file will look like this:
----------------------------------------
Bulk Meta Log - 2020-05-17 19:26:25
----------------------------------------
Filename: Img_0184.jpg
Old Subject : Test Subject 1
New Subject : Test Photo 1
Filename: Img_0269.jpg
Old Subject : Test Subject 2
New Subject : Test Photo 2
Double clicking a file in the list will launch the action selected in the script configuration. Possible options are:
- Show with DOpus Viewer - forces the DOpus viewer to show the file.
- Default Open action - this acts as if you double clicked the file in the lister.
- View Properties - show the standard properties dialog for the file.
- Insert File Name - inserts the file name into the edit box (same as previous versions).
The popup menu which will show when you right click on a file in the list looks like this:
Most options here are self-explanatory. The list contains a number of items whose name will change dynamically depending on the current metadata being shown, for example Insert Current Subject will become Insert Current Title if title metadata is being shown.
The Copy to option will also show the configured destination folder in the menu. This function will just copy the file, unmodified, to the destination folder.
The script adds the "BulkMeta" command to DOpus and it accepts a number of arguments.
ARGUMENT TYPE POSSIBLE VALUES DESCRIPTION
IMAGE /S <no value> Image files in the selected files will be used.
AUDIO /S <no value> Audio files in the selected files will be used.
PDF /S <no value> Pdf files in the selected files will be used.
LOGREADER /S <no value> Opens the log reader without showing the main
Bulk Meta dialog.
MODE /K <string> Select the mode that’s open by default in the
dialog. Value can be: Append, Clear, Filename,
FindReplace, Parent, Prefix, or Replace.
e.g: BulkMeta AUDIO MODE="FindReplace"
This will open the dialog in Find & Replace
mode with audio files used.
Log Reader:
A Log Reader dialog is available which provides an easy way to view the log file:
The Log Reader has a filter which allows you to type part of a filename to filter the list of log entries shown. The Reset button will clear the filter and display all log entries. Alternatively you can double click an entry in the list to filter based on that entries filename.
You can launch the Log Reader from within the Bulk Meta dialog (There's a new Log File... button in the dialog). Alternatively you can use the BulkMeta command with the LOGREADER argument to just use the log reader alone.
Screenshots:
A few screenshots to demonstrate several modes: