Page 1 of 1
Can I get AMC script to delete .rar files after extraction?
Posted: 15 Nov 2013, 05:02
by nzdreamer55
I have tried using the clean=y setting, but it leaves all of the .rar files behind.
Thanks
Re: Can I get AMC script to delete .rar files after extracti
Posted: 15 Nov 2013, 06:48
by rednoah
amc does not allow you to delete archives (unless you modify it yourself) because typically you wanna keep seeding the files
Re: Can I get AMC script to delete .rar files after extracti
Posted: 15 Nov 2013, 14:42
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?
Re: Can I get AMC script to delete .rar files after extracti
Posted: 15 Nov 2013, 15:09
by rednoah
This one may help you along:
http://pastebin.com/0RDGp146
Re: Can I get AMC script to delete .rar files after extracti
Posted: 15 Nov 2013, 15:29
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?
Re: Can I get AMC script to delete .rar files after extracti
Posted: 15 Nov 2013, 15:32
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.
Re: Can I get AMC script to delete .rar files after extracti
Posted: 15 Nov 2013, 16:26
by nzdreamer55
Is there a tutorial for calling scripts locally with filebot?
Re: Can I get AMC script to delete .rar files after extracti
Posted: 15 Nov 2013, 17:50
by rednoah
It's too easy to make tutorial...
http://www.filebot.net/script.html