Move folders

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
Helix
Posts: 3
Joined: 04 Nov 2012, 21:44

Move folders

Post by Helix » 04 Nov 2012, 21:48

Hi,
I was wonder if it is possible to move folders instead of extracting, using avi/mkv etc.
So just move
\finished\Dexter.S07E01.720p.HDTV.x264-EVOLVE\
to
\sorted\Dexter\Season 7\Dexter.S07E01.720p.HDTV.x264-EVOLVE

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

Re: Move folders

Post by rednoah » 05 Nov 2012, 01:14

Why would you wanna do that? Is there other files in that folder as well?

How about formatting each episode like this? Just using info from the original file to define the path to the new file.

Code: Select all

/sorted/{n}/Season {s}/{folder.name}/{fn}
:idea: Please read the FAQ and How to Request Help.

Helix
Posts: 3
Joined: 04 Nov 2012, 21:44

Re: Move folders

Post by Helix » 05 Nov 2012, 12:49

Yes, the folder contains samples, nfo, rar. So instead of just unraring and keeping the vidoe file i want to keep everything in a proper sorted scheme.

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

Re: Move folders

Post by rednoah » 05 Nov 2012, 12:57

Nope, that doesn't work. Logic for matching episodes won't accept folders as episode files.

However FileBot does take into account groups of files with the same name, so this works:

Code: Select all

Dexter.S07E01.720p.HDTV.x264-EVOLVE.avi
Dexter.S07E01.720p.HDTV.x264-EVOLVE.nfo
Dexter.S07E01.720p.HDTV.x264-EVOLVE.rar
EDIT:
Of course with a few lines of scripting you can probably get there. Especially if things are already well-named like this, you can check folders for SxE patterns with getEpisodeNumber(path), and with detectSeriesName(path) you can grab the series name from the folder name (see utorrent-postprocess.groovy for reference). There's no need to do any fancy matching if your filenames are pretty clear already. If you're ok with some Groovy scripting it's probably just a few lines, if scripting is not your thing then you're out of luck here.
:idea: Please read the FAQ and How to Request Help.

Helix
Posts: 3
Joined: 04 Nov 2012, 21:44

Re: Move folders

Post by Helix » 05 Nov 2012, 15:51

Great, thanks. Just what i wanted to know

Post Reply