Page 1 of 1

AMC script: clean isn't fully cleaning?

Posted: 19 Dec 2016, 19:02
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!

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

Posted: 20 Dec 2016, 01:19
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.

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

Posted: 20 Dec 2016, 04:20
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!

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

Posted: 20 Dec 2016, 05:13
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.

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

Posted: 20 Dec 2016, 18:11
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.