FileBot CLI (-bash: filebot: command not found)

Support for macOS users
Post Reply
Meshuu
Posts: 18
Joined: 09 Mar 2016, 15:50

FileBot CLI (-bash: filebot: command not found)

Post by Meshuu »

Hi guys,
I tell you right away that I use only FileBot command-line tool, and not the GUI app (never used), in fact I found this program a few years ago right through this post:
https://www.filebot.net/mac/brew.html

I am going now to explain the problem. I use FileBot CLI along with another application, that is Lingon X. I've made sure that when I copy content within a specific folder, this content is automatically scanned, renamed, and sorted by Filebot.
For some time I noticed that the files were no longer organized so I updated everything by running the command

Code: Select all

sh -xu <<< "$(curl -fsSL https://raw.githubusercontent.com/filebot/plugins/master/installer/app.sh)"
present at the link https://www.filebot.net/mac/brew.html

The program still does not work and the following message appears in the log:

Code: Select all

"/Users/meshuu/Backup/App/FileBot/Script/filebot.sh.command: line 1: filebot: command not found"
For completeness I insert the content of my script here:

Code: Select all

filebot -script fn:amc --output /Users/meshuu/Downloads/Media --action move -non-strict /Users/meshuu/Downloads/Completed --def music=y --log-file amc.log --def excludeList=amc.txt --def deleteAfterExtract=y --def clean=y
The first thing I did was to check with the

Code: Select all

brew cask list
command if FileBot is installed and actually appears in the list. The second was to check the correct operation and the version of FileBot using the command

Code: Select all

filebot -script fn:sysinfo
but the following message appears:
"-bash: filebot: command not found"

What can I do? I am not an expert so I am grateful for all the help you will be able to provide me.
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot CLI (-bash: filebot: command not found)

Post by rednoah »

Try to uninstall and reinstall:

Code: Select all

brew cask zap filebot && brew cask install filebot

:idea: According to your log, the filebot command in your $PATH, presumably /usr/local/bin/filebot, is linked incorrectly.


A good install might look like this:

Code: Select all

$ ls -l /usr/local/bin/filebot
lrwxr-xr-x  1 me  admin  51 Jan 28 12:34 /usr/local/bin/filebot -> /Applications/FileBot.app/Contents/MacOS/filebot.sh

:idea: On macOS, due to $PATH not always being respected by all 3rd party tools, or even first party tools such as Automator, using the absolute path /usr/local/bin/filebot might be a good idea.
:idea: Please read the FAQ and How to Request Help.
Meshuu
Posts: 18
Joined: 09 Mar 2016, 15:50

Re: FileBot CLI (-bash: filebot: command not found)

Post by Meshuu »

Thanks for the reply rednoah.
As you suggested to me I tried to uninstall and reinstall the program with the code:

Code: Select all

brew cask zap filebot && brew cask install filebot
and the Terminal returned the following message:

Code: Select all

==> Implied "brew cask uninstall filebot"
Error: It seems the App source '/Applications/FileBot.app' is not there.
I've never installed the FileBot app, but I've always used the FileBot command-line tool.
I really hope it can be solved. Thanks again.
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot CLI (-bash: filebot: command not found)

Post by rednoah »

Make sure to uninstall all versions of FileBot you may have copied or installed anywhere. Then do brew cask install filebot. Adding --force will usually do the trick if brew thinks things are inconsistent (e.g. brew thinks it's installed, but actually isn't).


1. Uninstall FileBot (if installed via brew)

Code: Select all

brew cask zap filebot --force
2. Install FileBot via brew:

Code: Select all

brew cask install filebot --force
3. Check if FileBot is installed correctly:

Code: Select all

/usr/local/bin/filebot -version
:idea: Please read the FAQ and How to Request Help.
Meshuu
Posts: 18
Joined: 09 Mar 2016, 15:50

Re: FileBot CLI (-bash: filebot: command not found)

Post by Meshuu »

rednoah wrote: 28 Jan 2020, 17:03 Make sure to uninstall all versions of FileBot you may have copied or installed anywhere. Then do brew cask install filebot. Adding --force will usually do the trick if brew thinks things are inconsistent (e.g. brew thinks it's installed, but actually isn't).


1. Uninstall FileBot (if installed via brew)

Code: Select all

brew cask zap filebot --force
2. Install FileBot via brew:

Code: Select all

brew cask install filebot --force
3. Check if FileBot is installed correctly:

Code: Select all

/usr/local/bin/filebot -version
I did these 3 steps as you suggested and the command:

Code: Select all

/usr/local/bin/filebot -version
now returns this result:

Code: Select all

FileBot 4.8.5 (r6224) / OpenJDK Runtime Environment 11.0.2 / Mac OS X 10.12.6 (x86_64)
I noticed that after carrying out the procedure recommended by you now FileBot also appears among my apps, but in these years I had never installed (having always used the command-line tool).
Also, my script still doesn't seem to work. So I checked the file "filebot.log" and the last lines are the following:

Code: Select all

FileBot requires a valid license. Please run `filebot --license *.psm` install your FileBot license.
Bad License (>_<)
Why does the FileBot app appear among my apps after installation? Do I need to have it installed now? I ask you why I have always used FileBot CLI without the app.
Why does this error / warning appear in the log?
Thanks in advance for your answers.
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot CLI (-bash: filebot: command not found)

Post by rednoah »

1.
You have always had it "installed" as in you've had all the files on your computer. If the app bundle folder just so happens to be located in the /Applications folder, then macOS will show it as "installed app" in the Launchpad.


2.
You will need to "install" your FileBot license first, either via the CLI as described in the error message, or via the GUI:
https://www.filebot.net/activate.html
:idea: Please read the FAQ and How to Request Help.
Meshuu
Posts: 18
Joined: 09 Mar 2016, 15:50

Re: FileBot CLI (-bash: filebot: command not found)

Post by Meshuu »

rednoah wrote: 29 Jan 2020, 20:33 1.
You have always had it "installed" as in you've had all the files on your computer. If the app bundle folder just so happens to be located in the /Applications folder, then macOS will show it as "installed app" in the Launchpad.


2.
You will need to "install" your FileBot license first, either via the CLI as described in the error message, or via the GUI:
https://www.filebot.net/activate.html
1. I am a neophyte regarding the command line but I know what the situation was before the update. The GUI app never appeared in the /Applications folder. So what I would like to understand is if something has changed in these months, since I haven't updated in a while. I have never used the GUI app, I've always used the FileBot command-line tool. Is there any way to continue doing this by uninstalling the GUI app?

2. Now also to use the FileBot command-line tool it is necessary to purchase the full license?

Thanks for the replies.
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot CLI (-bash: filebot: command not found)

Post by rednoah »

1.
The last free version was released ~3 years ago, so it'd be hard to track down any specific changes now. Everything has changed.

The GUI and the CLI are the same binary. So you can't have the GUI without the CLI and vice versa. But you can have FileBot not appear in Launchpad I suppose, if you move the app bundle elsewhere. You'd also have to symlink /usr/local/bin/filebot to the new path as well of course. Just ask a command-line-savvy friend to help you out if you're keen on this one.


2.
The new universal license system was introduced ~2 years ago, alongside new builds for all supported platforms, so all newer builds (non-Store) require a universal license:
viewtopic.php?t=6265
:idea: Please read the FAQ and How to Request Help.
Meshuu
Posts: 18
Joined: 09 Mar 2016, 15:50

Re: FileBot CLI (-bash: filebot: command not found)

Post by Meshuu »

Hi rednoah thank you and apologize for the delay in my reply.
I would like to ask you for information.
What does the purchase of the universal license for one year include? I'll explain. At the end of the year will the FileBot command-line tool continue to work and will I simply no longer receive updates or will it also stop working?
Thank you.
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot CLI (-bash: filebot: command not found)

Post by rednoah »

It will also stop working. The license is time-bound and not version-bound.
:idea: Please read the FAQ and How to Request Help.
Meshuu
Posts: 18
Joined: 09 Mar 2016, 15:50

Re: FileBot CLI (-bash: filebot: command not found)

Post by Meshuu »

Ok thank you for now.
Post Reply