Parsing STRING instead of FILE

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Reneg
Posts: 36
Joined: 04 Jan 2012, 20:32

Parsing STRING instead of FILE

Post by Reneg »

Hello,

Is it possible to use the RENAME function to parse a STRING as argument instead of a file path and give the renamed title as a ECHOED result ?

Thank you
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Parsing STRING instead of FILE

Post by rednoah »

No, the -rename command will expect valid file paths

If you need episode data for scripting then you can use the -list or the -mediainfo command:

Code: Select all

filebot -list --q "alias"

Code: Select all

filebot -mediainfo -r .
:idea: Please read the FAQ and How to Request Help.
Reneg
Posts: 36
Joined: 04 Jan 2012, 20:32

Re: Parsing STRING instead of FILE

Post by Reneg »

Code: Select all

C:\Program Files\FileBot>filebot -list --q "The Vampire Diaries Stagione 7 (2016) .mkv DLMux 1080p AC3 - ITA ENG SUBS"
Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at net.filebot.cli.CmdlineOperations.fetchEpisodeList(CmdlineOperations.java:1041)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:59)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:25)
        at net.filebot.Main.main(Main.java:124)
I tried it befor, but with complex Query string I'm getting this error
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Parsing STRING instead of FILE

Post by rednoah »

That's not how it works. The query parameter expects a search query (i.e. the series name).
:idea: Please read the FAQ and How to Request Help.
Reneg
Posts: 36
Joined: 04 Jan 2012, 20:32

Re: Parsing STRING instead of FILE

Post by Reneg »

Exactly, that's why I wanted to use the rename function.
Can u suggest me any workaround ?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Parsing STRING instead of FILE

Post by rednoah »

Nope, the rename function can only work with real files. If you look into FileBot/Groovy scripts you might find a few helpful internal functions, but nothing like that is exposed via the CLI.

If you explain the bigger picture and what you're trying to build, then maybe I'll think of something.
:idea: Please read the FAQ and How to Request Help.
Post Reply