GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Columns: Movie Filename Database

This is a script I made for a friend who has a huge movie collection. He wanted to keep track of movie's directors, countries and a few other fields. He bought Opus just for this script. I thought it was so cool I had to perfect it and share it.

This is what the script does for movies in any file format. There are many other columns not shown.

There's also a cool button that opens the imdb page for the selected movie.

I'm really excited about this way of working with files and look forward to feedback and a fruitful discussion. Apart from feedback and brainstorming on this script, I am particularly interested in hearing your thoughts about using file naming conventions to manage metadata.

Quick Tour

1. The script is based on RegexColumnsReloaded (mmm, actually it's the other way around)

2. There is a full tutorial on my new page about Using File Names to Make a Database

3. It showcases how if you use a simple naming convention, Opus can display any column you invent for files of any kind.

4. You can adapt this simple naming convention to files of any kind.
In fact I adapted it to make Columns: Books & Comics Filename Database.

The basic convention for a file is:
Title [metadata].extension

Inside the brackets, the metadata looks like this:
[year=2004_dir=Martin Scorcese]

==> It is a sequence of key=value, separated by underscores.
==> The fields can be specified in any order.
==> Many fields have aliases in case you don't remember the name.
==> For each file, you only specify the fields you want.

5. Adding or editing columns is a snap. The column definitions have really cool features. See the section of the tutorial on editing and defining fields.

6. The Magic Button
The button has three functions:
==> Toggles a Movies format you specify in Prefs / Folder Formats / Favorite Formats. (If you prefer to use the Content Type Format in the same menu, the function's code is easy to adapt.)
==> Launches the imdb page for the selected movie. For that, the filename must already contain a TT field corresponding to the movie page. For instance, set tt=tt0258463 for The Bourne Identity [LINK ]
==> Google searches for the movie's imdb page when the tt field is not yet in the filename. The first one is usually right, so just double-click the tt code and add it to the file name.

Movies.dcf (7.87 KB)

7. List of fields

8. Movies format
You will want to make a Books+Comics format either in
Prefs / Folder Formats / Favorite Formats
or in
Prefs / Folder Formats / Content Type Formats

In that format, I recommend shrinking the filename column, as you don't need to display it. Even when the file name is shrunk, you can easily select the file when enable full row selection in on (clicking anywhere on the row selects the file). The Movie button toggles full row selection so you shouldn't have to worry about that.

This is what my current view looks like.

9. Bulk addition of metadata on many files
This is a rename problem. See the bulk metadata operations section of the tutorial.

In short, you can set up rename presets.

Here's one which inserts a sample token ( cc=US token ) if you already have [metadata in brackets]:
=> Opus rename in regex mode
=> Search for ^([^]]+)(].*)
=> Replace with \1_cc=US\2
=> Save the preset, adapt when needed.

10. Limitation
Please bear in mind that Windows has a limit on the total length of path + file name: 260 characters. That's a lot of characters but it's good to keep in mind. Better now bury the files deep in the file hierarchy.

MovieFilenameDB.js.txt (37 KB)

0.9.2 At tbone's request, changed the column prefix from Movies_ to Movies.
0.9.1 Added three properties (got these ideas from Apocalypse): fileOnly, dirOnly, fullCupValue.

I have a small suggestion to your database columns, would you mind changing the "Movies_" prefix into "Movies."?
The dot "." has already been used to separate the prefix from the column name in other scripts, so we'd yield some standard and consistency in the long run.

(Sidenote: I wish for an enhancement on the folder options column-selection dialog. This dialog (and also the filter-editor iirc) does not allow to select columns of a specific script, which is the only reason we need to put some kind of prefix into the columns names. Leo, Jon, reading this? o) )

I wonder, why did you choose "" as separator for the fields?
I guess your weapon of choice to parse these filenames is regex and I guess "
" does not really raise any problems (yet?), but a more common character to separate fields like this is ";" - from my experience at least. Many people tend to use "_" in filenames, don't know if that could lead to parsing errors at some time?

Hi tbone,

I wish for an enhancement on the folder options column-selection dialog. This dialog (and also the filter-editor iirc) does not allow to select columns of a specific script, which is the only reason we need to put some kind of prefix into the columns names.

+1, I've been wishing for the same.

A picture to explain what we're talking about here, all the Script columns are mixed together. That's why we use a prefix:

Contrast with the column picker (easier to use because Script columns are grouped according to their script):

Sure! One question before doing that, if I don't feel like going from 0.9.1 to 0.9.2, where do I go from there to make sure the sequence works with ScriptWizard? or 0.9.10? (Or is 0.9.10 after 0.9.9?)

Maybe just go for 0.9.2 to prevent any issues (version comparison has been enhanced, but that SW is not released yet o).
Thanks for doing the prefix-issue demonstration and glad you agree on the "dot"! o))

  • Okay, done this for the three scripts.
  • In 0.9.1 I had added three properties (fileOnly, dirOnly, fullCupValue), if you or anyone else thinks of other useful ones please let me know.
  • Explained that the Movie button toggles full row selection (had forgotten to mention that but your mention of full row reminded me)
  • Added the button to toggle Book+Comics mode, had forgotten to do that