Hi, I'm entirely new to FileBot, have only just run into it tonight. I have my films stored on a Synology NAS box running Linux and can run FileBot from the command line.
I currently have a directory, Movies, and in that is a series of films in subfolders. I would like to form symlinks for these in genre categories, e.g. for "The Princess Bride", which might be characterised as Fantasy / Comedy / Romance, I would like symlinks for Movies\Fantasy\The Princess Bride, Comedy\The Princess Bride, etc to the original location.
Is this something that is easily achievable?
Sorting films by genre with symlinks?
Re: Sorting films by genre with symlinks?
Sure. Set --format to some path pattern that includes the genre, i.e. X:/Movies/{genres[0]}/... and set --action symlink. You need Java 7 for symlinking to work.
Please read the FAQ and How to Request Help.
Re: Sorting films by genre with symlinks?
Excellent! Thanks very much.
Re: Sorting films by genre with symlinks?
Playing with this, I am stuck with Java 6 on my Synology box so this is not an option. Ah well!
Re: Sorting films by genre with symlinks?
In scripting you could define a custom rename action that'll just execute "ln -s ..." for each file/episode match.
Please read the FAQ and How to Request Help.
Re: Sorting films by genre with symlinks?
e.g. Replace rename action with any cmdline tool:
http://filebot.sourceforge.net/forums/v ... ?f=4&t=252
http://filebot.sourceforge.net/forums/v ... ?f=4&t=252
Please read the FAQ and How to Request Help.
Re: Sorting films by genre with symlinks?
Thanks for your help, but my knowledge is clearly too basic! I can't even get the test script to work...
renamex(
file: args.getFiles(),
action: { from, to ->
execute('echo', 'FROM', from, 'TO', to)
}
)
// filebot -script fn:renall <options> <folder>
/*
* Rename all tv shows, anime or movies using given or default options
*/
args.eachMediaFolder {
rename(folder:it, renamex())
}
> filebot -script filmgenre.groovy .
MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.renamex() is applicable for argument types: (java.util.LinkedHashMap) values: [[file:[/volume1/video/Films/Comedy/.avi, ...], ...]]
groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.renamex() is applicable for argument types: (java.util.LinkedHashMap) values: [[file:[/volume1/video/Films/Comedy/.avi, ...], ...]]
at Script3.run(Script3.groovy:3)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (?_?)
renamex(
file: args.getFiles(),
action: { from, to ->
execute('echo', 'FROM', from, 'TO', to)
}
)
// filebot -script fn:renall <options> <folder>
/*
* Rename all tv shows, anime or movies using given or default options
*/
args.eachMediaFolder {
rename(folder:it, renamex())
}
> filebot -script filmgenre.groovy .
MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.renamex() is applicable for argument types: (java.util.LinkedHashMap) values: [[file:[/volume1/video/Films/Comedy/.avi, ...], ...]]
groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.renamex() is applicable for argument types: (java.util.LinkedHashMap) values: [[file:[/volume1/video/Films/Comedy/.avi, ...], ...]]
at Script3.run(Script3.groovy:3)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (?_?)
Re: Sorting films by genre with symlinks?
Well, the sample script works as it is. But you somehow randomly copy&pasted things together...
The only thing that changes is adding a custom action property where the value of that property is a closure:
The only thing that changes is adding a custom action property where the value of that property is a closure:
Code: Select all
args.eachMediaFolder {
rename(folder:it, action:{ from, to ->
execute('echo', 'FROM', from, 'TO', to)
})
}
Please read the FAQ and How to Request Help.
Re: Sorting films by genre with symlinks?
Thanks - never used Groovy or Filebot before so had no idea of the syntax. Your time is appreciated.
Re: Sorting films by genre with symlinks?
Sure, no worries. Let me know if you encounter any more problems and post the stuff you came up with when your finished.
Please read the FAQ and How to Request Help.