Best Practices for extracting then deleting archives after

Support for Windows users
Post Reply
PersnicketyEcon
Posts: 7
Joined: 12 Jan 2020, 22:47

Best Practices for extracting then deleting archives after

Post by PersnicketyEcon »

Let's assume I have a bunch of folders in my "Movies to Process" directory. Some of these are archives (.rar or .zip) some are not. I do not know how many of each I have, but the total number of folders necessitates some automation.

I know if I use the GUI, I can load all folders in Filter/Archives then Extract All to the directory of my choosing. But this won't delete the archives (or more importantly, their parent folders), so I will have to load these in the Rename section of the GUI as well. Filebot seems to want to rename the .r01, .r02, .r03 files in addition to the, say, .mkv file for the movie.

If I wanted to use the CLI first, I could use

Code: Select all

filebot -extract -r "Movies/to/Process" --output "Directory/of/my/choosing"
Or call the extract.groovy script, doing the same thing. But even if I use the script, using something like

Code: Select all

--def deleteAfterExtract=y
doesn't seem to work in the CLI. That's probably obvious but I can't see how to use it at the command line.

There might be a way to use 7-zip for the extraction portion instead. Something like is shown here:

Code: Select all

https://superuser.com/questions/371384/extract-all-zips-in-a-directory-incl-subfolders-with-a-bat-file-or-dos-comm
Maybe that is the way to go? Maybe I'm doing something wrong in the gui that makes it want to name the .rar files? Maybe I would be better off using AMC to do everything? (I'll be honest I've never gotten the hang of the AMC script)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Best Practices for extracting then deleting archives after

Post by rednoah »

1.
Since you're comfortable with using the GUI, let's go with that here for now.

Let's start with video files that don't need extraction first. Drop them into Rename, match against TheMovieDB, process into some new folder "Movies Already Processed". Done. No more video files in "Movies to Process".

On to Archives. Create a new folder "Extracted Movies". Drop "Movies to Process" into Filter, extract all the archives into our new "Extracted Movies" folder. Now this folder only contains video files, no archives. Easy. Process as usual.

Finally, our left behind "Movies to Process" folder contains only archives and other clutter files. Delete the whole folder. Done.


2.
--def deleteAfterExtract=y is an option specific to the amc script. It has no effect on -extract calls.
:idea: Please read the FAQ and How to Request Help.
PersnicketyEcon
Posts: 7
Joined: 12 Jan 2020, 22:47

Re: Best Practices for extracting then deleting archives after

Post by PersnicketyEcon »

2. Thanks, yeah, I suspected as much. I think I saw that in the forums elsewhere when I was searching for a solution, but I misunderstood.

1. This is basically what I have been doing, but one of the issues I face is if I end up with a ton of folders to process and I don't know which ones need to be extracted. So I'll have a bunch of archived movies, each in their own individual parent folder. So, for MovieA, I'll have MovieA.r1, MovieA.r2, etc, all in a folder named "MovieA." Out of the hundreds of movie folders, I have no way of knowing which ones contain archived files or not, without opening hundreds of folders. At times I've just done a simple Search on the parent directory. That seems to be the best way to do it. But I know when I have used node on my Synology, it will extract files that need extracting automatically, then delete the archive files. I guess I was looking for a way to do that in Windows.

Which then leads me to using AMC script, which I really should work on. :)

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

Re: Best Practices for extracting then deleting archives after

Post by rednoah »

1.
Does it matter where each individual archive is? If you drop your archives root folder into Filter, it'll find all Archives for you regardless of where specifically they are in the file structure. AFAIK, Extract All will flatten the file contents, so your selected extraction folder will just contain lots of video files and clutter files, so the original file structure also doesn't matter here.
:idea: Please read the FAQ and How to Request Help.
Post Reply