AMC script: clean isn't fully cleaning?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Unsoluble
Posts: 10
Joined: 21 Oct 2014, 05:02

AMC script: clean isn't fully cleaning?

Post by Unsoluble »

Hi there,

Am calling the amc script on a folder action, with the "clean=y" option. It's cleaning, but it's only cleaning everything except the root folder of the input. Is that normal?

So like if /Downloads gets this:

Code: Select all

Movie Title (2016)
	Movie Poster.jpg
	Info.txt
	Movie Title.mkv
The amc runs, moves the video file, trashes the jpg and the txt, but then leaves the "Movie Title (2016)" folder where it was. Can I tweak it to also get rid of that? Or do I need to script an additional step to take care of that?

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

Re: AMC script: clean isn't fully cleaning?

Post by rednoah »

The amc script will not delete folders/files that are passed on the command-line.

i.e. this command will NOT delete the current folder:

Code: Select all

filebot -script fn:amc . --def clean=y

PS: If you're calling the amc script on individual movie folders then your workflow might be a bit odd / inefficient.
:idea: Please read the FAQ and How to Request Help.
Unsoluble
Posts: 10
Joined: 21 Oct 2014, 05:02

Re: AMC script: clean isn't fully cleaning?

Post by Unsoluble »

Hmm. I'm using this Automator setup, so the individual movie folders are getting passed as the Folder Action service notices them. Guess I need to do the passed-folder deletion in a second separate step then. Thanks for clarifying!
User avatar
rednoah
The Source
Posts: 23933
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC script: clean isn't fully cleaning?

Post by rednoah »

Yeah, if just the folder is passed then the amc script won't allow you to delete the root folder.

Instead using clean=y you could make a separate call to the cleaner script which allows you to delete the root by passing in root=y I think.
:idea: Please read the FAQ and How to Request Help.
Unsoluble
Posts: 10
Joined: 21 Oct 2014, 05:02

Re: AMC script: clean isn't fully cleaning?

Post by Unsoluble »

Gotcha. Since I'm already using Automator to build the folder action, ended up just using a "Move Finder items to Trash" on the root after the FileBot script runs.
Post Reply