Page 1 of 1

Moving unrenamed files after renaming files

Posted: 24 Jun 2017, 22:56
by Asuna
Say I have a show with extras that are not identified by Filebot. How could I move or copy the extra files along with the files that have been renamed to the destination folder created by Filebot.
Ex: I have anime that includes the opening and ending in seperate files that are not identified as renamable by Filebot but the rest of the series is detected and can be renamed. I want to move the the OP/ED along with the rest of the series to the new folder.
Thanks for any help.

Re: Moving unrenamed files after renaming files

Posted: 25 Jun 2017, 03:08
by rednoah
Since these files won't be mapped to any tv show or episode numbers, you won't be able to process those files with FileBot. You could write your own script that checks the FileBot history and then searches for left-behind files.

Re: Moving unrenamed files after renaming files

Posted: 25 Jun 2017, 03:36
by Asuna
Darn, I thought I could get away without bash scripts.
Thanks for the reply.

Re: Moving unrenamed files after renaming files

Posted: 25 Jun 2017, 03:39
by rednoah
I'd write a Groovy script. Much better for more complex tasks. ;)

Pseudo Code:

Code: Select all

getRenameLog(true).each{ from, to ->
    from.dir.listFiles{ it =~ /OP|ED/ }*.copyTo(to.dir)
}
You can use the history script as an example:
https://github.com/filebot/scripts/blob ... ory.groovy

Re: Moving unrenamed files after renaming files

Posted: 25 Jun 2017, 03:49
by Asuna
Time to learn some Groovy I suppose. ;)