Page 1 of 1

Script not found: rename

Posted: 17 Jan 2020, 12:33
by rodrigo
Hi all, i updated the version of filebot to 4.8.5 (r6224)

Code: Select all

$ filebot -script fn:sysinfo
FileBot 4.8.5 (r6224)
JNA Native: java.lang.ExceptionInInitializerError
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
p7zip: p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,32 bits,4 CPUs LE)
unrar: java.io.IOException: Cannot run program "unrar": error=2, No such file or directory
Chromaprint: fpcalc version 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 1.8.0_232
JVM: 32-bit OpenJDK Client VM
CPU/MEM: 4 Core / 181 MB Max Memory / 13 MB Used Memory
OS: Linux (arm)
HW: Linux rpi3 4.19.55-6-osmc #1 SMP PREEMPT Sun Nov 3 22:15:28 UTC 2019 armv7l GNU/Linux
DATA: /home/rodrigo/.filebot
Package: DEB
And now i'm getting this error when running fn:rename

Code: Select all

$ filebot -script fn:rename
Script not found: rename
java.io.FileNotFoundException: Script not found: rename
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:55)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:163)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:37)
	at net.filebot.Main.main(Main.java:132)
Any ideas what might happend?
Thanks

Re: function replace not found

Posted: 17 Jan 2020, 15:24
by rednoah
:!: There is no rename script. I can't remember there ever being a rename script.

:arrow: There is a replace script though.

:arrow: There is also the amc script.

:arrow: There is also a filebot -rename command.

Re: Script not found: rename

Posted: 17 Jan 2020, 16:33
by rodrigo
Hi, thanks for the reply.
I can asure you that there was a script rename, at least until 4.7.9 that was my previous version of filebot.
I'll try if either replace (script) or rename (command) works the way rename did.
Thanks

Re: Script not found: rename

Posted: 17 Jan 2020, 16:38
by rednoah
What did your rename script do?


I can find no rename script in the history for the last ~4~6 years. Perhaps you where using the renall script?
https://github.com/filebot/scripts

Re: Script not found: rename

Posted: 17 Jan 2020, 17:29
by rodrigo
Hi I've try the replace script and get the same error:

Code: Select all

filebot -script fn:replace ~/Downloads --action move --def "e=.spa.srt" "r=.es.srt"
Script not found: replace
java.io.FileNotFoundException: Script not found: replace
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:55)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:163)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:37)
	at net.filebot.Main.main(Main.java:132)

Error (o_O)
The default lang extension for spanish is spa but i need it to be es

Re: Script not found: rename

Posted: 17 Jan 2020, 18:54
by rednoah
1.
Here's how I'd accomplish that with the built-in tools:

Code: Select all

filebot -rename -r /input --db file --filter f.subtitle --format "{folder}/{fn.replace('.spa', '.es')}" --action TEST
Rename files using [Plain File]
[TEST] from [test.spa.srt] to [test.es.srt]
Processed 1 files
:idea: viewtopic.php?t=2072



2.
If you're using FileBot to process your files first, and then again to fix subtitle extensions, then you could just modify the format in the first call to give you what you want right away:

Code: Select all

{lang.ISO2}
https://www.filebot.net/naming.html