OSX Filebot scripting no longer works

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
LexLolly
Posts: 7
Joined: 03 Nov 2013, 11:42

OSX Filebot scripting no longer works

Post by LexLolly »

Hi, I have downloaded filebot 4.5.3 of the Apple APP Store (yes i paid for it) and it did over write my older free version 3.8.
The reason I downloaded the latest version was that the rename script i ran stopped working and I noticed that the 3.8 gui version stopped working too (like many times before - it was always resolved by downloading the upgraded version).

However the APP store version does not have the program "filebot" in the "Contents\MacOS" anymore. There is a "FileBotAppLauncher" instead so it appears that i lost the option to run filebot scrips.

How do I get this to work again!!

Thanks for any help on this.



------------ Here my script (it worked well for over a year now)
set ProgramPath to "/Applications/FileBot.app/Contents/MacOS/filebot"
set FilePath to "/Users/name/Desktop/Temp Work/Ready to Upload/"
set FileTestPath to "Macintosh HD:Users:name:Desktop:Temp Work:Ready to Upload:" as alias
set FormatFile to "{n}.{s00e00} - {t}"

tell application "Finder"
set TVShowFileNames to name of every file in FileTestPath
end tell


repeat with TVShow in TVShowFileNames
try
set RenameFile to FilePath & TVShow
--display dialog RenameFile
do shell script (quoted form of ProgramPath) & " -rename " & (quoted form of RenameFile) & " --db TheTVDB --conflict skip -non-strict --format " & (quoted form of FormatFile)
on error
--do nothing
end try
end repeat
User avatar
rednoah
The Source
Posts: 23928
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: OSX Filebot scripting no longer works

Post by rednoah »

Apple does not allow command-line tools in the App Store.

Use brew to install the filebot command-line tools:
viewtopic.php?f=4&t=2049

PS: You should call filebot via "filebot" and not "/Applications/FileBot.app/Contents/MacOS/filebot"
:idea: Please read the FAQ and How to Request Help.
LexLolly
Posts: 7
Joined: 03 Nov 2013, 11:42

Re: OSX Filebot scripting no longer works

Post by LexLolly »

rednoah, i installed based on your post.

so how would I now call the script as below script no has an error:

set ProgramPath to "filebot"
...
do shell script (quoted form of ProgramPath) & " -rename " & (quoted form of RenameFile) & " --db TheTVDB --conflict skip -non-strict --format " & (quoted form of FormatFile)


Thanks for your Help
Lex
LexLolly
Posts: 7
Joined: 03 Nov 2013, 11:42

Re: OSX Filebot scripting no longer works

Post by LexLolly »

Rednoah,
i have changed my script ProgramPath to:
set ProgramPath to "/opt/homebrew-cask/caskroom/filebot/4.5.3/filebot.app/Contents/MacOS/filebot.sh"

This works!

I am just trying to figure out how to just call "filebot" without all the path info.
User avatar
rednoah
The Source
Posts: 23928
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: OSX Filebot scripting no longer works

Post by rednoah »

brew cask will automatically create a symlink in /usr/local/bin and since that's always in the $PATH the shell will be able to find "filebot"

Code: Select all

$ which filebot
/usr/local/bin/filebot
But if you have issues with Apple Script you need to ask Google. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply