Find and Replace Template: Difference between revisions
m (→Use) |
|||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[File:RMCF-Find Replace-Inset Copy Example.png|thumb|right|380px|The Find & Replace Template set to copy files to the Desktop.]] |
[[File:RMCF-Find Replace-Inset Copy Example.png|thumb|right|380px|The Find & Replace Template set to copy files to the Desktop.]] |
||
{{Incomplete}} |
|||
{{See also|Rename, Move, and Copy Files}} |
{{See also|Rename, Move, and Copy Files}} |
||
Line 16: | Line 15: | ||
* The Find & Replace Template ''can'' be combined with the other [[Rename, Move, and Copy Files Templates]], but usually it is simplest to use it by itself. |
* The Find & Replace Template ''can'' be combined with the other [[Rename, Move, and Copy Files Templates]], but usually it is simplest to use it by itself. |
||
* If the Find & Replace Template is not enabled, then only the other Templates will be used. |
* If the Find & Replace Template is not enabled, then only the other Templates will be used. |
||
* Be sure to carefully check the Preview Panel before committing any changes to disk. The Find & Replace Template does exactly what you tell it to do, and you could set it up to overwrite all of the selected files with a single filename. |
* Be sure to '''carefully''' check the Preview Panel before committing any changes to disk. The Find & Replace Template does exactly what you tell it to do, and you could set it up to overwrite all of the selected files with a single filename. |
||
* Unlike the other Rename, Move, and Copy Files Templates, the Find & Replace Template can be used to alter file extensions. You can search for .mp3 and replace it with .flac for example. This usually works best when combined with the tool's ''Update database to point to new location'' mode. |
* Unlike the other Rename, Move, and Copy Files Templates, the Find & Replace Template can be used to alter file extensions. You can search for .mp3 and replace it with .flac for example. This usually works best when combined with the tool's ''Update database to point to new location'' mode. |
||
* To use, enter the '''exact''' text you'd like to search for in the ''Find What'' box, and the exact text you'd like it to be replaced with in the ''Replace With'' box. The Preview Panel will show the results immediately in the ''New'' column. |
* To use, enter the '''exact''' text you'd like to search for in the ''Find What'' box, and the '''exact''' text you'd like it to be replaced with in the ''Replace With'' box. The Preview Panel will show the results immediately in the ''New'' column. |
||
* The search is ''not'' case sensitive. The case of the replacement text will be preserved. |
* The search is ''not'' case sensitive. The case of the replacement text will be preserved. |
||
== Examples == |
== Examples == |
||
The Find & Replace template searches against the existing full filename path, and replaces that text with exactly what you enter in the Replace With box. |
The Find & Replace template searches against the existing full filename path, and replaces that text with exactly what you enter in the Replace With box. Like the other Templates, the easiest way to understand how to use the system is with examples. |
||
=== Moving Files to a Dedicated Media Drive === |
|||
⚫ | |||
⚫ | |||
A common use for the Find & Replace Template is to move a large set of files which are already organized nicely, from a system disk to a dedicated media disk (or, perhaps, consolidating many smaller dedicated disks into one). Suppose you'd been storing all of your music files in the regular, default "My Music" location on a Windows computer, but now you want to move them to larger dedicated media driver (or perhaps a NAS). |
|||
⚫ | |||
⚫ | |||
So, if the originally selected filenames are: |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
And you want to move them to your M drive in the Audio folder, you could enter the following in the template: |
And you want to move them to your M drive in the Audio folder, you could enter the following in the template: |
||
Line 35: | Line 40: | ||
When applied, the filenames will become: |
When applied, the filenames will become: |
||
<tt>M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\01 - Sgt. Pepper's Lonely Hearts Club Band.flac</tt> |
* <tt>M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\01 - Sgt. Pepper's Lonely Hearts Club Band.flac</tt> |
||
<tt>M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\02 - With a Little Help from My Friends.flac</tt> |
* <tt>M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\02 - With a Little Help from My Friends.flac</tt> |
||
<tt>M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\03 - Lucy in the Sky with Diamonds.flac</tt> |
* <tt>M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\03 - Lucy in the Sky with Diamonds.flac</tt> |
||
<tt>M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\04 - Getting Better.flac |
* <tt>M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\04 - Getting Better.flac</tt> |
||
[[File:RMCF-Find Replace-Move Example.png|thumb|none|720px|Moving files from the System drive to a Media Drive.]] |
|||
If the mode is set to one of the Rename or Copy options, then the files will be moved or copied to the new destination, while preserving the existing file and folder structure. When using this tool, it is important to look for a portion of the source filenames that is common to all the files, but which won't appear multiple times. So, in the example above, you wouldn't want to just search for the term "music" because this word might appear in the individual song titles (especially if there are a lot of files selected). |
|||
Similarly, if you wanted to move them instead to a UNC-accessible NAS share, you could use something like: |
|||
: ''Find What'': <tt>C:\Users\USERNAME\</tt> |
|||
: ''Replace With'': <tt>\\myserver.mynetwork.lan\media\Audio\</tt> |
|||
And you'd end up with: |
|||
* <tt>\\myserver.mynetwork.lan\media\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\01 - Sgt. Pepper's Lonely Hearts Club Band.flac</tt> |
|||
* <tt>\\myserver.mynetwork.lan\media\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\02 - With a Little Help from My Friends.flac</tt> |
|||
* <tt>\\myserver.mynetwork.lan\media\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\03 - Lucy in the Sky with Diamonds.flac</tt> |
|||
* <tt>\\myserver.mynetwork.lan\media\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\04 - Getting Better.flac</tt> |
|||
=== Copying Files From a Network Volume === |
|||
The same system works for other media types, and other types of replacements. Another useful example is making temporary copies of a set of files from a network volume onto a local disk. If, for example, on Mac OSX, you have a bunch of video files stored on a network volume, like these: |
|||
* <tt>/Volumes/media/Video/TV Show/Homeland/04/s04e01 - The Drone Queen.mkv</tt> |
|||
* <tt>/Volumes/media/Video/TV Show/Homeland/04/s04e03 - Shalwar Kameez.mkv</tt> |
|||
* <tt>/Volumes/media/Video/TV Show/Homeland/04/s04e04 - Iron in the Fire.mkv</tt> |
|||
* <tt>/Volumes/media/Video/TV Show/Homeland/04/s04e05 - About a Boy.mkv</tt> |
|||
And you want to copy them onto your Macbook's internal hard drive to watch on your upcoming flight, without making a mess of things, you could set the Rename, Move, and Copy Files tool into [[Rename,_Move,_and_Copy_Files#Modes|Copy Mode]], and then use: |
|||
: ''Find What'': <tt>/Volumes/media/Video/</tt> |
|||
: ''Replace With'': <tt>/Users/USERNAME/Movies/</tt> |
|||
And you'd end up with: |
|||
* <tt>/Users/USERNAME/Movies/TV Show/Homeland/04/s04e01 - The Drone Queen.mkv</tt> |
|||
* <tt>/Users/USERNAME/Movies/TV Show/Homeland/04/s04e03 - Shalwar Kameez.mkv</tt> |
|||
* <tt>/Users/USERNAME/Movies/TV Show/Homeland/04/s04e04 - Iron in the Fire.mkv</tt> |
|||
* <tt>/Users/USERNAME/Movies/TV Show/Homeland/04/s04e05 - About a Boy.mkv</tt> |
|||
[[File:RMCF-Find Replace-Copy Example-Mac.png|thumb|none|720px|Copying files from a network volume to the system drive.]] |
|||
When applied, this would create new ''copies'' of the files in your user's Movies folder, so you can easily take them with you on the trip, but it will preserve the same folder and filename structure that you have on the network drive. |
|||
If desired, you could instead set the Mode to [[Rename,_Move,_and_Copy_Files#Modes|Copy and update database to point to new location]] mode, and then the it will create the copies, and "re-point" your Media Center Library to these new files. That way, you can easily use Media Center while on the trip to view the files. And, when you return, you can quickly "reverse" the change. Simply select the files again in the tool and: |
|||
* Set the Mode to [[Rename,_Move,_and_Copy_Files#Modes|Update database to point to new location (no file rename, move, or copy)]] mode. |
|||
* Use ''Find What'': <tt>/Users/USERNAME/Movies/</tt> |
|||
* Use ''Replace With'': <tt>/Volumes/media/Video/</tt> |
|||
* When done, and you're sure the files are back and working in their original locations, you delete your temporary copies out of the Movies folder. |
|||
And you've put them back to the way they were when you started, while preserving all the metadata you might have gained while on the trip (such as Played status). |
|||
== More == |
|||
If the mode is set to one of the Rename or Copy options, then the files will be moved or copied to the new destination, while preserving the existing file and folder structure. |
|||
* [http://yabb.jriver.com/interact/index.php?topic=97682.msg675273#msg675273 Using Find & Replace Templates to switch File Types] |
|||
The same system works for other media types, and other types of replacements. |
|||
* [http://yabb.jriver.com/interact/index.php?topic=92492.0 Moving files from my hard drive to network drive] |
|||
[[Category:Rename, Move, and Copy Files]] |
[[Category:Rename, Move, and Copy Files]] |
Latest revision as of 05:40, 28 May 2015
- See also: Rename, Move, and Copy Files
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
The Find & Replace Template is perfect for these kinds of tasks, where you want to preserve the existing file and folder structure on disk, but alter it in specific ways.
Use
- The Find & Replace Template can be combined with the other Rename, Move, and Copy Files Templates, but usually it is simplest to use it by itself.
- If the Find & Replace Template is not enabled, then only the other Templates will be used.
- Be sure to carefully check the Preview Panel before committing any changes to disk. The Find & Replace Template does exactly what you tell it to do, and you could set it up to overwrite all of the selected files with a single filename.
- Unlike the other Rename, Move, and Copy Files Templates, the Find & Replace Template can be used to alter file extensions. You can search for .mp3 and replace it with .flac for example. This usually works best when combined with the tool's Update database to point to new location mode.
- To use, enter the exact text you'd like to search for in the Find What box, and the exact text you'd like it to be replaced with in the Replace With box. The Preview Panel will show the results immediately in the New column.
- The search is not case sensitive. The case of the replacement text will be preserved.
Examples
The Find & Replace template searches against the existing full filename path, and replaces that text with exactly what you enter in the Replace With box. Like the other Templates, the easiest way to understand how to use the system is with examples.
Moving Files to a Dedicated Media Drive
A common use for the Find & Replace Template is to move a large set of files which are already organized nicely, from a system disk to a dedicated media disk (or, perhaps, consolidating many smaller dedicated disks into one). Suppose you'd been storing all of your music files in the regular, default "My Music" location on a Windows computer, but now you want to move them to larger dedicated media driver (or perhaps a NAS).
So, if the originally selected filenames are:
- C:\Users\USERNAME\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\01 - Sgt. Pepper's Lonely Hearts Club Band.flac
- C:\Users\USERNAME\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\02 - With a Little Help from My Friends.flac
- C:\Users\USERNAME\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\03 - Lucy in the Sky with Diamonds.flac
- C:\Users\USERNAME\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\04 - Getting Better.flac
And you want to move them to your M drive in the Audio folder, you could enter the following in the template:
- Find What: C:\Users\USERNAME\
- Replace With: M:\Audio\
When applied, the filenames will become:
- M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\01 - Sgt. Pepper's Lonely Hearts Club Band.flac
- M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\02 - With a Little Help from My Friends.flac
- M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\03 - Lucy in the Sky with Diamonds.flac
- M:\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\04 - Getting Better.flac
If the mode is set to one of the Rename or Copy options, then the files will be moved or copied to the new destination, while preserving the existing file and folder structure. When using this tool, it is important to look for a portion of the source filenames that is common to all the files, but which won't appear multiple times. So, in the example above, you wouldn't want to just search for the term "music" because this word might appear in the individual song titles (especially if there are a lot of files selected).
Similarly, if you wanted to move them instead to a UNC-accessible NAS share, you could use something like:
- Find What: C:\Users\USERNAME\
- Replace With: \\myserver.mynetwork.lan\media\Audio\
And you'd end up with:
- \\myserver.mynetwork.lan\media\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\01 - Sgt. Pepper's Lonely Hearts Club Band.flac
- \\myserver.mynetwork.lan\media\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\02 - With a Little Help from My Friends.flac
- \\myserver.mynetwork.lan\media\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\03 - Lucy in the Sky with Diamonds.flac
- \\myserver.mynetwork.lan\media\Audio\Music\B\The Beatles\Sgt. Pepper's Lonely Hearts Club Band\04 - Getting Better.flac
Copying Files From a Network Volume
The same system works for other media types, and other types of replacements. Another useful example is making temporary copies of a set of files from a network volume onto a local disk. If, for example, on Mac OSX, you have a bunch of video files stored on a network volume, like these:
- /Volumes/media/Video/TV Show/Homeland/04/s04e01 - The Drone Queen.mkv
- /Volumes/media/Video/TV Show/Homeland/04/s04e03 - Shalwar Kameez.mkv
- /Volumes/media/Video/TV Show/Homeland/04/s04e04 - Iron in the Fire.mkv
- /Volumes/media/Video/TV Show/Homeland/04/s04e05 - About a Boy.mkv
And you want to copy them onto your Macbook's internal hard drive to watch on your upcoming flight, without making a mess of things, you could set the Rename, Move, and Copy Files tool into Copy Mode, and then use:
- Find What: /Volumes/media/Video/
- Replace With: /Users/USERNAME/Movies/
And you'd end up with:
- /Users/USERNAME/Movies/TV Show/Homeland/04/s04e01 - The Drone Queen.mkv
- /Users/USERNAME/Movies/TV Show/Homeland/04/s04e03 - Shalwar Kameez.mkv
- /Users/USERNAME/Movies/TV Show/Homeland/04/s04e04 - Iron in the Fire.mkv
- /Users/USERNAME/Movies/TV Show/Homeland/04/s04e05 - About a Boy.mkv
When applied, this would create new copies of the files in your user's Movies folder, so you can easily take them with you on the trip, but it will preserve the same folder and filename structure that you have on the network drive.
If desired, you could instead set the Mode to Copy and update database to point to new location mode, and then the it will create the copies, and "re-point" your Media Center Library to these new files. That way, you can easily use Media Center while on the trip to view the files. And, when you return, you can quickly "reverse" the change. Simply select the files again in the tool and:
- Set the Mode to Update database to point to new location (no file rename, move, or copy) mode.
- Use Find What: /Users/USERNAME/Movies/
- Use Replace With: /Volumes/media/Video/
- When done, and you're sure the files are back and working in their original locations, you delete your temporary copies out of the Movies folder.
And you've put them back to the way they were when you started, while preserving all the metadata you might have gained while on the trip (such as Played status).