Windows CLI for Music

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
jeremyk
Posts: 5
Joined: 17 Nov 2013, 15:51

Windows CLI for Music

Post by jeremyk »

Hi

Can Filebot on Windows use --db fpcalc? If so, how do I get it to find music files?

I can get it to run on OSX but that has too many problems to mention. I wanted to try run it under windows but --db fpcalc doesn't change the db. It remains on [TheMovieDB]

The command line I am using is
filebot -rename "C:\Music" --output "c:\Fixed" --db fpcalc --format "{AlbumArtist} {Album} {n}"

The exit codes:
Filename pattern: [NaN] SxE, [NaN] CWS
Rename movies using [TheMovieDB]
Exception: No media files: []
Failure (¦_¦)
Launch4j: Failed to run the given command.

I am not sure if the --format is correct but just need to get it to find music files first.
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Windows CLI for Music

Post by rednoah »

It's the same name as in the GUI, i.e.:

Code: Select all

--db AcoustID
:idea: Please read the FAQ and How to Request Help.
jeremyk
Posts: 5
Joined: 17 Nov 2013, 15:51

Re: Windows CLI for Music

Post by jeremyk »

Thanks Red. That was stupid of me.....using fpcalc instead of AcoustID.

Now getting Failed to exec fpcalc Exit Code 2. I fixed this on OSX but not sure how on windows. fpcalc is in the path and in the folder I am running it from. Any ideas?

J
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Windows CLI for Music

Post by rednoah »

Windows exec() doesn't quite work the same way. Just use the installer and it'll work out of the box. That installer also include fpcalc.exe and it'll set filebot up to use the fpcalc.exe from the filebot install folder.
:idea: Please read the FAQ and How to Request Help.
jeremyk
Posts: 5
Joined: 17 Nov 2013, 15:51

Re: Windows CLI for Music

Post by jeremyk »

Hi
I wanted to close off my thread so here is the result of my efforts.

After help from rednoah and poking around, reading, trial and error I have the following to report.
The goal is to use the CLI from a Windows installation to rename music files and put them in a prescribed structure. Also the command must recourse sub-directories.


The goal is like this:

TopFolder (Fixed in my example)
      Artist 
         Album
             Track
             Track

Here is the command line:

filebot -rename -r "C:\Music" --action copy --output "c:\Fixed" --db AcoustID --format "\{n}\{Album}\{t}" >>FBLog.txt

[the above command is on one line. the >>FBLog.txt simply puts all the output into a text file]

-r = recourse folders ; {n} = Name of artist ; {Album} = name of album ; {t} = name of track. DO NOT FORGET THE \'s

(In fact, I used the --action move. Then it was easy to clear out the empty directories and deal with the tracks that AcoustID didn't match)

The only problem I encountered is that the resolution of names from the CLI is different to the resolution in the gui. The CLI names things differently and misses more tracks than the gui.
Why, I don't yet know but I will start another thread for that.

For completeness, it should be noted that the CLI (and the gui) cannot cope with a huge number of folders. It is far better to write a script either using the Filebot tools or a simple batch file that deals with each folder in turn.

Thanks to all for the help.
Post Reply