Moving unrenamed files after renaming files

Any questions? Need some help?
Post Reply
Asuna
Posts: 3
Joined: 24 Jun 2017, 22:50

Moving unrenamed files after renaming files

Post 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.
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Moving unrenamed files after renaming files

Post 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.
:idea: Please read the FAQ and How to Request Help.
Asuna
Posts: 3
Joined: 24 Jun 2017, 22:50

Re: Moving unrenamed files after renaming files

Post by Asuna »

Darn, I thought I could get away without bash scripts.
Thanks for the reply.
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Moving unrenamed files after renaming files

Post 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
:idea: Please read the FAQ and How to Request Help.
Asuna
Posts: 3
Joined: 24 Jun 2017, 22:50

Re: Moving unrenamed files after renaming files

Post by Asuna »

Time to learn some Groovy I suppose. ;)
Post Reply