Can I get AMC script to delete .rar files after extraction?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
nzdreamer55
Posts: 168
Joined: 20 Jul 2012, 23:25

Can I get AMC script to delete .rar files after extraction?

Post by nzdreamer55 »

I have tried using the clean=y setting, but it leaves all of the .rar files behind.

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

Re: Can I get AMC script to delete .rar files after extracti

Post by rednoah »

amc does not allow you to delete archives (unless you modify it yourself) because typically you wanna keep seeding the files
:idea: Please read the FAQ and How to Request Help.
nzdreamer55
Posts: 168
Joined: 20 Jul 2012, 23:25

Re: Can I get AMC script to delete .rar files after extracti

Post by nzdreamer55 »

I see. So if I am using a seed box and don't need to keep seeding from my computer how can I modify to clean these files?
User avatar
rednoah
The Source
Posts: 23936
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I get AMC script to delete .rar files after extracti

Post by rednoah »

This one may help you along:
http://pastebin.com/0RDGp146
:idea: Please read the FAQ and How to Request Help.
nzdreamer55
Posts: 168
Joined: 20 Jul 2012, 23:25

Re: Can I get AMC script to delete .rar files after extracti

Post by nzdreamer55 »

I see that there is something that says

// extract archives (zip, rar, etc) that contain at least one video file
def tempFiles = []
input = input.flatten{ f ->
if (f.isArchive() || f.hasExtension('001')) {
def extractDir = new File(f.dir, f.nameWithoutExtension)
def extractFiles = extract(file: f, output: new File(extractDir, f.dir.name), conflict: 'override', filter: { it.isArchive() || it.isVideo() || it.isSubtitle() || (music && it.isAudio()) }, forceExtractAll: true) ?: []
tempFiles += extractDir
tempFiles += extractFiles

println "Mark archive for deletion: $f"
f.deleteOnExit()
f.dir.listFiles().toList().findAll{ v -> v.extension ==~ /r\d+/ && v.name.startsWith(f.nameWithoutExtension) }.each{ v ->
println "Mark volume for deletion: $v"
v.deleteOnExit()
}

return extractFiles
}
return f
}

Do I need to modify something here? Do I need to past this into the AMC script? I thought that filebot connected to the internet and get the AMC script from your web site each time?
User avatar
rednoah
The Source
Posts: 23936
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I get AMC script to delete .rar files after extracti

Post by rednoah »

Yes, fn:amc means it'll grab my master script. If you want to use a modified version you can't use my script have to set the scripts up locally. It also means you won't get updates I will make to the master script online.
:idea: Please read the FAQ and How to Request Help.
nzdreamer55
Posts: 168
Joined: 20 Jul 2012, 23:25

Re: Can I get AMC script to delete .rar files after extracti

Post by nzdreamer55 »

Is there a tutorial for calling scripts locally with filebot?
User avatar
rednoah
The Source
Posts: 23936
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I get AMC script to delete .rar files after extracti

Post by rednoah »

It's too easy to make tutorial... http://www.filebot.net/script.html
:idea: Please read the FAQ and How to Request Help.
Post Reply