[TOOL] Rename files from Explorer context menu on SEVEN

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
hal9000
Posts: 2
Joined: 17 May 2015, 11:15

[TOOL] Rename files from Explorer context menu on SEVEN

Post by hal9000 »

note:
This is to get Title on French langage on 64bit version of windows
It's easy adaptable to other langage or 32bit version of windows (see comments in regfile)


To get these functions when you right click on a file on Explorer
Image

1) Get Subtitle for a selected file but before you need:
a) to create an account on http://www.opensubtitles.org
b) and login to OpenSubtitles.org from Filebot by typing on cmd console

Code: Select all

filebot -script fn:osdb.login
and then enter your login and password of OpenSubtitles.org (just need to do this once)
2) Rename Anime for a selected Japanese Anime file using AniDB engine with [<Anime Title> - (<year>)] format
3) Rename Episode for a selected Serial Episode file using TheTVDB engine with [<Serial Title> - S00E00 - Episode Title] format
4) Rename Movie for a selected Movie file using TheMovieDB engine with [<Movie Title> - (<year>)] format
5) Rename Undo Undo the renamed file (thanks rednoah!)


Select all this lines below and save it to a file named filebot-context-menu.reg on your Desktop and execute it

Code: Select all

Windows Registry Editor Version 5.00

# To rename a serial episode to format : <Serial Title> - SxxExx - Episode Title
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Rename Episode\command]
@="cmd /c filebot -rename -r \"%1\" --format \"{n} - {s00e00} - {t}\"  --db TheTVDB -non-strict --lang fr --log-file context.log"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Rename Episode]
"Icon"="%ProgramW6432%\\FileBot\\filebot.exe"

# To rename a movie title to format : <Movie Title> - (<year>)
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Rename Movie\command]
@="cmd /c filebot -rename -r \"%1\" --format \"{n} ({y})\" --db TheMovieDB -non-strict --lang fr --log-file context.log"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Rename Movie]
"Icon"="%ProgramW6432%\\FileBot\\filebot.exe"

# To rename a Manga Anime title to format : <Anime Title> - (<year>)
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Rename Anime\command]
@="cmd /c filebot -rename -r \"%1\" --format \"{n} ({y})\" --db AniDB -non-strict --lang fr --log-file context.log"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Rename Anime]
"Icon"="%ProgramW6432%\\FileBot\\filebot.exe"
# if you have installed a 32 bit version of Filebot, use %ProgramFiles% or %ProgramFiles (x32)% instead of %ProgramW6432%

# To undo the renamed file with Filebot
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Rename Undo\command]
@="cmd /c filebot -script fn:revert \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Rename Undo]
"Icon"="%ProgramW6432%\\FileBot\\filebot.exe"

# To get subtitle from OpenSubtitles.org
# To login to OpenSubtitles.org from Filebot : >filebot -script fn:osdb.login
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Get Subtitle\command]
@="cmd /c filebot -get-missing-subtitles \"%1\" -non-strict --lang fr --encoding utf8 --log-file context.log"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Get Subtitle]
"Icon"="%ProgramW6432%\\FileBot\\filebot.exe"

# To avoid error : Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs]

# Same if 64bit of JAVA is installed on WIN64 bit
#[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Prefs]
Think it will be usefull! ;-)
Last edited by hal9000 on 18 May 2015, 11:15, edited 4 times in total.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [TOOL] Rename files from Explorer context menu on SEVEN

Post by rednoah »

1)
Nice Job! I have something similar here => viewtopic.php?f=3&t=1053

2)
For reverting file to their original names you can use the filebot -script fn:revert script. You just pass in a file or folder and if FileBot can find any matching entries in it's history then it'll revert these files to their original names. So you could easily do "Revert selected files to their original names" menu item.
:idea: Please read the FAQ and How to Request Help.
hal9000
Posts: 2
Joined: 17 May 2015, 11:15

Re: [TOOL] Rename files from Explorer context menu on SEVEN

Post by hal9000 »

rednoah wrote:1)
Nice Job! I have something similar here => viewtopic.php?f=3&t=1053

2)
For reverting file to their original names you can use the filebot -script fn:revert script. You just pass in a file or folder and if FileBot can find any matching entries in it's history then it'll revert these files to their original names. So you could easily do "Revert selected files to their original names" menu item.
Thank you very much rednoah
I updated my regfile with your handy method to revert a renamed file, this is exactly what I'm looking for, thank you! :)
InFerNoBeasTz
Posts: 4
Joined: 08 Aug 2021, 21:22

Re: [TOOL] Rename files from Explorer context menu on SEVEN

Post by InFerNoBeasTz »

How would I rename multiple folders of anime. I used this script https://github.com/filebot/plugins/blob ... t-menu.reg
Post Reply