Page 1 of 1

[TOOL] Escape Tool for escaping cmdline arguments

Posted: 26 Oct 2013, 10:06
by rednoah
This little tool will help you escape cmdline arguments. Per default it'll spawn a GUI but if you run it on a headless machine it'll just run a simple CLI.

Start Escape Tool:

Code: Select all

filebot -script fn:escape
View Script:

Re: [TOOL] Escape Tool for escaping cmdline arguments

Posted: 13 May 2014, 10:14
by rednoah
Alternative: @syntax
You can specify arguments line by line a text file:

Code: Select all

filebot @/path/to/args.txt

Alternative: xargs
If you're on Linux you can be smart and use xargs. Just specify the arguments line by line in a text file and then just use xargs to make the call:

Code: Select all

cat amc.arguments | tr '\n' '\0' | xargs -0 filebot

Alternative: Groovy
As an alternative to escaping arguments you can use languages like Groovy that support triple quotes for String definitions and allow you to make the call with a String Array of arguments, and make (almost) any form of escaping unnecessary:

Code: Select all

['''filebot''', '''-help'''].execute() ... rom+Groovy