AMC script --def clean=y --action move - but only delete what filebot extracted

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
phisher1
Posts: 2
Joined: 26 May 2017, 13:24

AMC script --def clean=y --action move - but only delete what filebot extracted

Post by phisher1 »

I really like the --def clean=y option, but filebot, in combination with --action move will delete files that it considers clutter such as .nfo and .sfv files in addition to the extracted directory that is now empty.

Is there a way to make it only delete the contents that were extracted? Basically leaving the original directory contents as they were.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC script --def clean=y --action move - but only delete what filebot extracted

Post by rednoah »

Have you tried --def deleteAfterExtract=y yet? That's assuming by "extracted files" you mean that you're processing zip/rar/etc archives which isn't specifically mentioned in your OP. ;)

If you just use --action move then files will be moved (i.e. deleted from the original location) and everything else that isn't moved isn't touched either. So simply not using --def clean=y should get you the results you want.
:idea: Please read the FAQ and How to Request Help.
Synk556
Posts: 21
Joined: 02 Dec 2017, 23:06

Re: AMC script --def clean=y --action move - but only delete what filebot extracted

Post by Synk556 »

rednoah wrote: 07 Feb 2018, 04:31 Have you tried --def deleteAfterExtract=y yet? That's assuming by "extracted files" you mean that you're processing zip/rar/etc archives which isn't specifically mentioned in your OP. ;)

If you just use --action move then files will be moved (i.e. deleted from the original location) and everything else that isn't moved isn't touched either. So simply not using --def clean=y should get you the results you want.
No, the move command leaves behind the empty folders created upon extraction. In other words, filebot creates a sub folder, extracts the media into it, then moves the media out...leaving the empty folder. The delete command deletes those empty folders, but then also the .sfv and .nfo files which screws up the torrents, and additionally removes one's ability to right-click a torrent and 'delete torrent and data' efficiently, because that emtpy folder prevents the client from deleting the main folder as it would if there were no other files in it. You have to manually delete the folder. I've linked a picture for reference. https://gyazo.com/667373d643b077d5cf7142e7009d425b

I was actually going to ask this myself.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC script --def clean=y --action move - but only delete what filebot extracted

Post by rednoah »

You can use a custom --def extractFolder if you don't like archives extracted in their current location.
:idea: Please read the FAQ and How to Request Help.
Synk556
Posts: 21
Joined: 02 Dec 2017, 23:06

Re: AMC script --def clean=y --action move - but only delete what filebot extracted

Post by Synk556 »

rednoah wrote: 01 Mar 2018, 06:31 You can use a custom --def extractFolder if you don't like archives extracted in their current location.
That's certainly better, and I'll implement it, because it'll leave multiple folders easily deletable with only a single intervention by me. Even better would be the ability to tell the delete command to ignore particular file types.
Post Reply