Rename paths from text file

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
User avatar
rednoah
The Source
Posts: 18986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Rename paths from text file

Post by rednoah »

Some people may want to rename only a specific set of files. For example only renaming movies XBMC doesn't recognized while leaving everything else untouched.

Let's say we have a file paths.txt containing a list of paths

Code: Select all

D:\Avatar.avi
Groovy Script:

Code: Select all

args*.eachLine{
	rename(file:it)
}
Cmdline Usage (inline syntax):

Code: Select all

filebot -script "g:args*.eachLine{rename(file:it)}" -non-strict "paths.txt"
Output:

Code: Select all

Filename pattern: [0,00] SxE, [0,00] CWS
Rename movies using [TheMovieDB]
Looking up movie by filehash via [TheMovieDB]
TheMovieDB: Hash lookup not supported
Auto-detect movie from context: [D:\Avatar.avi]
[MOVE] Rename [D:\Avatar.avi] to [Avatar (2009).avi]
Processed 1 files

PS: Newer releases of FileBot will also allow you to drop text files with paths onto the "Original Files" list.
:idea: Please read the FAQ and How to Request Help.
Post Reply