Rename, Move, and Copy Files: Difference between revisions

From wiki.jriver.com
Jump to navigation Jump to search
Line 44: Line 44:
=== Using With Media Network Libraries ===
=== Using With Media Network Libraries ===


The Rename, Move, and Copy Files tool ''cannot'' be used to update the Library being served by another copy of Media Center running as a [[Library Server]]. Therefore, only ''Copy Mode'' listed above functions when accessed by a Client copy of MC. To use it for renaming or moving files, you must run it on the server machine directly.
The Rename, Move, and Copy Files tool ''cannot'' be used to update the Library being served by another copy of Media Center running as a [[Library Server]]. Therefore, only ''Copy Mode'' listed above functions when accessed by a Client copy of MC. To use it for moving files or anything that updates the Library, you must run it on the server machine directly.


=== Files That Will Be Processed ===
=== Files That Will Be Processed ===

Revision as of 20:26, 30 May 2015

This article is a incomplete. It is missing detail about critical functions, or contains a number of red links. You can help the JRiver Wiki by expanding it.
Media Center's Rename, Move, & Copy Files dialog, ready to organize some files on disk.

This is a powerful Library Tool that can be used to move, rename, and create copies of your files using their Library Fields (metadata tags) to create a file structure on disk. This is also a great way to get your media organized into a central location on your hard disk.

Media Center generally does not care where the files you import into your Library live on disk. It can use files from any volume that can be seen by your operating system (including UNC paths and network drives on Windows, and mounted shares on Mac OSX). Unlike iTunes, MC does not automatically create duplicates and move your files around on disk when files are imported, but it uses them exactly where it found them. This is good because it can be used alongside other applications (like iTunes, if you desire).

However, if you want to organize your files and consolidate them into directories on disk, the Rename, Move, and Copy Files tool provides a powerful and flexible way to get yourself organized. It can also be used to create copies of your media files and for a handful of other filesystem management tasks.

To access this tool, select the files you'd like to move or copy elsewhere, and do one of:

  • Right-click > Library Tools > Rename, Move, & Copy Files
  • Tools > Library Tools > Rename, Move, & Copy Files
  • Press F6

This will open the Rename, Move, and Copy Files dialog shown at right. Set the dialog's options and check through the preview panel to make sure your changes look correct, and then click OK to apply the changes or make the copies.

Cautions

Before running the Rename, Move, and Copy Files tool, you should always consider several cautions:

  • Make a Library Backup: As mentioned above, creating a Library Backup before running the tool is strongly recommended. It can alter your files on disk and your Library in Media Center.
  • Disable Auto-Import Background Scanning: You may also want to temporarily disable Auto-Import Background Scanning. Otherwise, if you apply changes to any Watched Directories, the Auto-Import system may pick up changes while the tool is still running and moving files, which can leave your Library in an inconsistent state.
  • Do a few files first: Before you select every file in your Library and apply a new file naming template, select just a handful of files to test it with. Make sure to investigate where the files end up and make sure you got everything right before you apply changes to large sets of files.
  • Use the Preview Panel: The tool provides a preview of changes. Review this before applying your changes to make sure you didn't make any mistakes, or select the wrong files.
  • Understand filesystem basics: Using this tool effectively requires a basic understanding of how your system stores files on disk, and about filesystem paths. You don't need to be an expert, but you will need to understand basics about how files are named, where they are stored on disk, and how your operating system structures the filenames used.

Modes

Rename Move Copy-Modes.png

The Rename, Move, and Copy Files tool can be used in one of four primary modes:

Rename (moves files if directory changes)
Renames and moves files, including from one disk to another.
Copy
Creates new independent copies of the selected files. This mode does not alter the Library or the source files on disk.
Copy and update database to point to new location
Creates new independent copies of the selected files, and replaces the Library entries for the existing source files with the new files. This is identical to Rename mode, except that it leaves the original copies behind untouched.
Update database to point to new location (no file rename, move, or copy)
Only changes the [Filename] path for the selected files in the Media Center Library. This mode does not move or copy any files on disk.

Using With Media Network Libraries

The Rename, Move, and Copy Files tool cannot be used to update the Library being served by another copy of Media Center running as a Library Server. Therefore, only Copy Mode listed above functions when accessed by a Client copy of MC. To use it for moving files or anything that updates the Library, you must run it on the server machine directly.

Files That Will Be Processed

Enable this if you want Media Center to move or copy sidecar files it didn't create.

By default, Media Center will only process the following files:

  • The specific files selected when you open the Rename, Move, and Copy Files tool (those shown in the Preview Panel)
  • Any sidecar files Media Center created itself (cover art and JRSidecar.xml files) which have not been imported into MC's Library.

Any other auxiliary files not explicitly selected in the tool will be left untouched in their original locations. This includes sidecar files which may be "related to" the source media files, such as auxiliary artwork or subtitle files.

If you want MC to also move or copy these sidecar files, enable:

Move all files in folder (including non-imported files)
If enabled, all non-imported files found alongside the selected media files will be moved to the destination directory along with the source files. Note that if the files have been imported, they will still not be moved (otherwise the database entries for these files would break) and you must select them explicitly in Media Center to have the tool process them.

Templates

The Rename, Move, and Copy Files tool reorganizes your files on disk using one or more of a set of templates that determine the final filename and directory path used. These are:

  • Directories: the base disk and directories used to store the files
  • Filename: the names given to the individual files
  • Find & Replace: alter the original paths by finding and replacing text strings in the source filenames and paths.

Directories

The Directories Template with a basic setup for music files on Mac OSX.

The Directories Template is used to set the base path and directories used to store your files. You set a Base Path that will be used for all files selected in the tool (this would typically contain the disk letter or volume name), and then a Rule which auto-generates the directories used based on each file's metadata. The Directories Template does not consider the source directories, disk, or volume, and the selected files can come from a variety of source locations.

For example, you might want to consolidate files from a variety of source locations on disk into a common media folder, and then put each file in folders corresponding to their [Artist] property, with sub-folders for each [Album].

For a full description of configuring this template, see:

Filename

The Filename Template with a basic setup for music files.

The Filename Template is used to set the naming of the files selected in the tool. Like the Directories Template, it consists of a Rule which auto-generates the filename base on each file's metadata. The Filename Template does not consider the source filenames at all, and the replacement name is built from scratch using the Rule.

For example, you might want to name your music files with their [Disc #], [Track #], and [Name], and your movies with their [Name] and [Year].

For a full description of configuring this template, see:

Find & Replace

The Find & Replace Template set to copy files to the Desktop.

The Find & Replace Template is used to alter the existing file path by searching for text in the original filename, and replacing it with new text. It is often most useful when moving large sets of files from one disk or storage location to another. Unlike the Filename and Directories Templates, the Find & Replace Template is used to transform the existing filename.

For example, you might want to:

  • move all of the files from Drive E to Drive M, or
  • move all of the files from /Users/<USERNAME>/Music over to /Users/Shared/Media/Audio/Music
  • copy a set of files from a network drive to a local disk, while preserving the original filename and directory structure

For a full description of configuring this template, see:

Special Characters and Slashes

RMCF-Replace Slashes.png

Any special characters output by a field or expression included in a Template will be converted to underscores (_) to ensure that the filename produced is valid in the filesystem. Media Center may also truncate values if the maximum length of the filename produced exceeds allowable OS limits.

Also, any fields that contain slash characters used to delineate directory names will be converted to underscores automatically (backslashes on Windows, and forward slashes on other OSes). Otherwise, if the Artist field contained "AC\DC" and you used this field in your Directories Template, you'd end up with a folder called "AC" which contains a folder called "DC".

If you are intentionally using a calculated field to create directory structures in your Directories Template, you can uncheck the Replace slashes in expressions option to pass through any slashes found in an expression or field as-is.

Empty Fields

Empty fields output as "Unknown".

Any field used in a Template which contains no value for a particular file is output as:

Unknown <Field Name>

For example, if you include [Disc #] in your Directories Template, and select files which do not contain a value in that field, the output will be Unknown Disc # as is shown in the screenshot on the right.

If you'd prefer this value to be omitted entirely when the output from the field is empty, you can use a simple expression instead of the Field itself to handle these fields specially. Instead of inserting the [Disc #] field directly, you can use:

If(IsEmpty([Disc #],1),,[Disc #])

And then this will output as nothing at all, and that part of the filename or directory structure to be omitted. For more information, refer to this thread on Interact:

Availability

The Rename, Move, and Copy Files tool is available on all versions of Media Center (including OSX and Linux). In older versions of Media Center, it was called Rename Files from Properties, and while all features are not identical, older versions functioned in largely the same manner.

More