Automatic Move and Rename - JavLuv/JavLuv GitHub Wiki
Moving / Renaming
JavLuv has an automatic renaming feature. It can move and rename folders and files according to a set of user-defined rules. Metadata can be used to generate movie-specific paths and filenames. Token identifiers representing specific types of metadata are surrounded by curly brackets and a keyword, sometimes with additional parameters.
Enable automatic move / rename
The automatic move / rename feature is off by default. Checking this option enables automatic move / rename options elsewhere in JavLuv, such as in the movie browser's context menu and the Scan Movies dialog box. The feature permits JavLuv to automatically move and rename your movies and related files (cover images, preview image, subtitle) how you like, using fields that describe how each movie's folder and files should be named using a specialized descriptive language.
Metadata tokens
Folders and filenames can use these specialized tokens to substitute metadata from a movie to create either unique or shared folders and filenames. Since the DVD-ID is guaranteed to be unique, we highly recommend using it somewhere in your filenames, especially if you choose to put your movie in shared folders. Otherwise, you may experience filename collisions, since no other metadata is guaranteed to be unique.
The following are the list of metadata that can be used to generate folders and filenames. Illegal characters such as question marks, slashes, colons, etc, will be automatically replaced with Unicode look-alike characters. When using some metadata with potentially very long lengths, you must specify a maximum length (or one will be automatically chosen) in order to prevent Windows maximum path length of 260 characters. Note that you are responsible for limiting the maximum combined length under this limit, as JavLuv only restricts individual field lengths.
{DVD-ID}
- The unique ID of the movie, often in a form ABC-123 or similar.{TITLE #}
- Title of the movie, followed by a number that indicates how many characters are allowed. Folder concatenation attempts to break on the nearest word, and indicates this with an ellipse.{ACTRESS #}
- Name of actress(es) in title, with optional maximum number of actresses to list (default is 1).{STUDIO}
- Name of the studio{YEAR}
- Year movie was released{RELEASE_DATE}
- Release date movie was released in YYYY-MM-DD format{USER_RATING #-#="Folder1" #-#="Folder2"}
- Allows substitution of multiple folder names according to the user rating (a value between 0 and 10).{SEQUENCE "-" ALPHA/ALPHA_LOWER/NUMBER}
- Creates a consecutive set of trailing identifiers depending on the last identifier.ALPHA
creates uppercase letters (A, B, C),ALPHA_LOWER
creates lowercase letters (a, b, c), andNUMBER
creates a sequence of numbers (1, 2, 3).
Metadata tokens and other path for filename data can be used in various fields used for different purposes.
Fields
- Library Folder - Identifies the destination folder for your JAV library. Metadata tokens cannot be used in this field.
- Folder - Defines the folder or folders used to contain all files associated with a single movie or group of movies. If this field is blank, all files are stored in the library folder.
- Movie - Defines the filename used for movies. Because multiple filenames of this type may be present, this field may end with a custom
SEQUENCE
. If one is not specified, a default sequence is provided. - Cover - Defines the filename used for cover images.
- Preview - Defines the filename used for preview (thumbnail) images. Because multiple filenames of this type may be present, this field may end with a custom
SEQUENCE
. If one is not specified, a default sequence is provided. - Metadata - Defines the filename used for metadata (generated .nfo file).
Examples
We'll look at a number of ways you can organize your movie files. Let's imagine we have a movie with the following metadata:
- Title:
Example Movie
- DVD-ID:
ABC-123
- Studio:
Example Studio
- Year:
2020
- User Rating:
4 1/2 stars
- Actresses:
Sakura Sakuraba
Example 1
Now, let's suppose we've filled out all move / rename options with the following values:
- Library:
D:\JavLibrary
- Folder:
{DVD-ID}
- Movie:
Movie
- Cover:
Cover
- Preview:
Preview
- Metadata:
Metadata
This results in a fairly simple folder and file structure that will look like the following:
D:\
|__JavLibrary
|__ABC-123
|__Cover.jpg
|__Metadata.nfo
|__Movie.mp4
|__Preview.jpg
Example 2
A slightly more complex folder structure may involve multiple sub-folders and involve several types of metadata. For example, if we provide the following settings:
- Library:
D:\JavLibrary
- Folder:
{ACTRESS}\{STUDIO}\{YEAR}\{TITLE 50}
- Movie:
{DVD-ID}
- Cover:
{DVD-ID} Cover
- Preview:
{DVD-ID} Preview
- Metadata:
{DVD-ID}
This will result in a folder structure like the following, where you sort by actress, studio, year, and finally the movie's title:
D:\
|__JavLibrary
|__Sakura Sakuraba
|__Example Studio
|__2020
|__Example Movie
|__ABC-123.mp4
|__ABC-123.nfo
|__ABC-123 Cover.jpg
|__ABC-123 Preview.jpg
Example 3
You can actually split your collection up by folder based on your user rating. Let's suppose our settings are set like this:
- Library:
D:\JavLibrary
- Folder:
{USER_RATING 9-10="Favorites" 1-8="Library" 0="New"}\[{DVD-ID}] {TITLE 80}
- Movie:
{DVD-ID}
- Cover:
{DVD-ID} Cover
- Preview:
{DVD-ID} Preview
- Metadata:
{DVD-ID}
The resulting folder and file structure will look like this:
D:\
|__JavLibrary
|__Favorites
|__[ABC-123] Example Movie
|__ABC-123.mp4
|__ABC-123.nfo
|__ABC-123 Cover.jpg
|__ABC-123 Preview.jpg
Because our user rating is four and a half stars (a value of 9), the movie is placed under the "Favorites" folder.
Example 4
Alternatively, you may choose not to place your movies under any specific folder at all. If the Folder field is left blank, all files will go under the library folder.
- Library:
D:\JavLibrary
- Folder:
- Movie:
{DVD-ID} {TITLE}
- Cover:
{DVD-ID} Cover
- Preview:
{DVD-ID} Preview
- Metadata:
{DVD-ID}
The end result looks like this:
D:\
|__JavLibrary
|__ABC-123 Example Movie.mp4
|__ABC-123.nfo
|__ABC-123 Cover.jpg
|__ABC-123 Preview.jpg
As previously mentioned, it is highly recommended to utilize the DVD-ID
in your naming scheme to ensure all files are uniquely named. Otherwise, it is likely that collisions will occur, in which case the rename / move operation will fail.
Performing Move / Rename
There are two ways to move / rename your movies. If you check the Move / rename after scan option in the Scan Movies dialog, then this will be performed every time you scan a new movie. It will automatically be moved into your library folder and named according to your preferred rules.
Alternately, you can select any number of movies in the browser view (CTRL-A selects all files), right click, and select Move / Rename... from the context menu. It does no harm to attempt to move / rename files that have already had this operation performed on them. If nothing needs moving or renaming, nothing will occur.