Page 1 of 1

--format doesn't seem to be working on mac os x mavericks

Posted: 25 Nov 2013, 08:21
by d.custer91
Thank you for this wonderful program you've created.

The format option does not seem to be moving files to specified directory.

Code: Select all

#Renames Movies
if ls -1 $HOME/Documents/FileBot/Movies/* >/dev/null 2>&1
then
        /Applications/FileBot.app/Contents/MacOS/filebot -rename $HOME/Documents/FileBot/Movies —-format “$HOME/Documents/iFlicks/{n}\ \({y}\)” -non-strict
else
        echo There are no movies to rename.
fi
Filename pattern: [0.00] SxE, [0.00] CWS
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/Users/$HOME/Documents/FileBot/Movies/step brothers.mp4]
Failed to write xattr: java.io.File.toPath()Ljava/nio/file/Path;
[MOVE] Rename [/Users/$HOME/Documents/FileBot/Movies/step brothers.mp4] to [Step Brothers (2008).mp4]
Processed 1 files
Done ?(?????)?
logout

[Process completed]

Any input would be greatly appreciated :)

Re: --format doesn't seem to be working on mac os x maverick

Posted: 25 Nov 2013, 09:21
by rednoah
Looks like you're passing in $HOME literally:

Code: Select all

[MOVE] Rename [/Users/$HOME/Documents/FileBot/Movies/step brothers.mp4] to [Step Brothers (2008).mp4]
The --format option definitely works, and is probably just no passed in correctly somehow by that script. I guess you wanna play with passing in absolute paths or something.

Re: --format doesn't seem to be working on mac os x maverick

Posted: 25 Nov 2013, 21:50
by d.custer91
I just tried absolute paths with no script. Still not functioning properly. Updated to Java 7 hoping it would help. It didn't. Even deleted and re-downloaded the FileBot.app

Code: Select all

filebot -rename /Users/davidcuster/Documents/FileBot/Movies —-format “/Users/davidcuster/Documents/iFlicks/{n}\ \({y}\)” -non-strict

Re: --format doesn't seem to be working on mac os x maverick

Posted: 26 Nov 2013, 05:43
by rednoah
I can reproduce it if I copy&paste your format, but not if type it myself! :D
http://snag.gy/zEiG1.jpg

Whatever you're doing, just do something different. There must be invisible control characters or encoding issues somewhere. Don't copy & paste, use a different editor, type the command it anew, ... no idea, but the issue is on your side

Also the "..." chars look weird (Did you use Word???) and you don't need to escape blanks or parenthesis.

Re: --format doesn't seem to be working on mac os x maverick

Posted: 26 Nov 2013, 07:02
by d.custer91
You were right. IDK what it was. I just re-typed the whole thing using vi. It now works. Also, is there a way to have multiple naming schemes in the same script? One for movies, and one for tv shows?

Code: Select all

#Renames & Moves Movies
if ls -1 /path/to/movies/* >/dev/null 2>&1
then
        filebot -r -rename /path/to/movies --format /path/to/iflicks/watch/folder/{n}\ \({y}\) -non-strict
else
        echo There are no movies to rename.
fi

Code: Select all

#Renames & Moves TV Shows
if ls -1 /path/to/tv-shows/* >/dev/null 2>&1
then
        filebot -r -rename /path/to/tv-shows --format /path/to/iflicks/watch/folder/{n}\ - {s00e00} -non-strict
else
        echo There are no tv shows to rename.
fi

Re: --format doesn't seem to be working on mac os x maverick

Posted: 26 Nov 2013, 07:11
by rednoah
That's what scripting is for. Though it boils down to calling rename twice with different formats/modes.

PS: If you know you handle only-movies or only-tvshows you should force the mode via --db TheTVDB/TheMovieDB.