Filebot + AMC script with clean option leaving one empty folder

All your suggestions, requests and ideas for future development
Post Reply
Zebbe152
Posts: 12
Joined: 18 Mar 2015, 09:06

Filebot + AMC script with clean option leaving one empty folder

Post by Zebbe152 »

Hi,

I've been using filebot with the AMC script for many years now and I'm extremely happy with it. :D

However today I noticed that filebot is leaving an empty folder after extracting a rar archive even though I have the clean option included in my script.

Example:

Extracting

Code: Select all

Read archive [ncis.s16e02.720p.hdtv.x264-avs.rar] and extract to [D:\PostProcessingTemp\UnPack\Sonarr\ncis.s16e02.720p.hdtv.x264-avs\NCIS.S16E02.720p.HDTV.x264-AVS]

Extracting files [D:\PostProcessingTemp\UnPack\Sonarr\ncis.s16e02.720p.hdtv.x264-avs\NCIS.S16E02.720p.HDTV.x264-AVS\NCIS.S16E02.720p.HDTV.x264-AVS.mkv]
Cleaning

Code: Select all

Delete D:\PostProcessingTemp\UnPack\Sonarr\ncis.s16e02.720p.hdtv.x264-avs\NCIS.S16E02.720p.HDTV.x264-AVS\NCIS.S16E02.720p.HDTV.x264-AVS.mkv
Delete D:\PostProcessingTemp\UnPack\Sonarr\ncis.s16e02.720p.hdtv.x264-avs\NCIS.S16E02.720p.HDTV.x264-AVS
As you can see it deletes the .mkv file and one of the folders created during extraction, but it leaves one empty folder named "ncis.s16e02.720p.hdtv.x264-avs".

I checked my log and filebot used to delete ALL folders that were created during extraction. According to my log the behavior changed about two months ago.

I'm running Filebot 4.8.4 (r5829) on Windows 10. Is this a bug or has the "clean" feature changed?
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot + AMC script with clean option leaving one empty folder

Post by rednoah »

I don't think anything has changed in that regards, but clean-up behaviour is quite different depending on your command-line options, especially --action and --def ut_* options you pass in as input. The command-line call and full log would be helpful here, to see what exactly is going on, and to run a similar test myself.
:idea: Please read the FAQ and How to Request Help.
Zebbe152
Posts: 12
Joined: 18 Mar 2015, 09:06

Re: Filebot + AMC script with clean option leaving one empty folder

Post by Zebbe152 »

I must say this is very strange. I haven't changed anything in forever. I compared a log from yesterday to one that's a few months older and the only thing that's different is the paths.

I put together a simpler command line for you (not as messy as my original one :) ). I ran it and the end result is the same, it still leaves an empty folder behind.

Code: Select all

filebot -script fn:amc --output "C:/Filebot" --log-file "C:/Filebot/Logs/amc.log" --action copy --conflict override -non-strict --def clean=y seriesFormat="E:/Test/{n}/{fn}" "ut_label=tv" "ut_title=Lethal.Weapon.S03E02.720p.WEB.x264-TBS" "ut_kind=multi" "ut_dir=F:/Test/Lethal.Weapon.S03E02.720p.WEB.x264-TBS" "extractFolder=D:/PostProcessingTemp/UnPack/Sonarr"

Here's the output

Code: Select all

Run script [fn:amc] at [Wed Oct 03 13:42:59 CEST 2018]
Parameter: clean = y
Parameter: seriesFormat = E:/Test/{n}/{fn}
Parameter: ut_label = tv
Parameter: ut_title = Lethal.Weapon.S03E02.720p.WEB.x264-TBS
Parameter: ut_kind = multi
Parameter: ut_dir = F:/Test/Lethal.Weapon.S03E02.720p.WEB.x264-TBS
Parameter: extractFolder = D:/PostProcessingTemp/UnPack/Sonarr
Ignore extra: F:\Test\Lethal.Weapon.S03E02.720p.WEB.x264-TBS\Sample
Read archive [lethal.weapon.s03e02.720p.web.x264-tbs.rar] and extract to [D:\PostProcessingTemp\UnPack\Sonarr\lethal.weapon.s03e02.720p.web.x264-tbs\Lethal.Weapon.S03E02.720p.WEB.x264-TBS]
Extracting files [D:\PostProcessingTemp\UnPack\Sonarr\lethal.weapon.s03e02.720p.web.x264-tbs\Lethal.Weapon.S03E02.720p.WEB.x264-TBS\lethal.weapon.s03e02.720p.web.x264-tbs.mkv]
Input: D:\PostProcessingTemp\UnPack\Sonarr\lethal.weapon.s03e02.720p.web.x264-tbs\Lethal.Weapon.S03E02.720p.WEB.x264-TBS\lethal.weapon.s03e02.720p.web.x264-tbs.mkv
Group: [tvs:lethal weapon] => [lethal.weapon.s03e02.720p.web.x264-tbs.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Lethal Weapon]
Fetching episode data for [Lethal Weapon]
[COPY] from [D:\PostProcessingTemp\UnPack\Sonarr\lethal.weapon.s03e02.720p.web.x264-tbs\Lethal.Weapon.S03E02.720p.WEB.x264-TBS\lethal.weapon.s03e02.720p.web.x264-tbs.mkv] to [E:\Test\Lethal Weapon\lethal.weapon.s03e02.720p.web.x264-tbs.mkv]
Processed 1 files
Clean temporary extracted files
Delete D:\PostProcessingTemp\UnPack\Sonarr\lethal.weapon.s03e02.720p.web.x264-tbs\Lethal.Weapon.S03E02.720p.WEB.x264-TBS\lethal.weapon.s03e02.720p.web.x264-tbs.mkv
Delete D:\PostProcessingTemp\UnPack\Sonarr\lethal.weapon.s03e02.720p.web.x264-tbs\Lethal.Weapon.S03E02.720p.WEB.x264-TBS
Done ヾ(@⌒ー⌒@)ノ

I also tried it without the extractFolder option, but it still leaves an empty folder.
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot + AMC script with clean option leaving one empty folder

Post by rednoah »

Maybe fixed. Please try with -script dev:amc to run the latest revision.
:idea: Please read the FAQ and How to Request Help.
Zebbe152
Posts: 12
Joined: 18 Mar 2015, 09:06

Re: Filebot + AMC script with clean option leaving one empty folder

Post by Zebbe152 »

Yes, that did it! How long until it works when running fn:amc?

Thanks for the excellent support!
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot + AMC script with clean option leaving one empty folder

Post by rednoah »

Please run it for a day or two. Confirm that everything works, and then I'll push a new stable release.
:idea: Please read the FAQ and How to Request Help.
Zebbe152
Posts: 12
Joined: 18 Mar 2015, 09:06

Re: Filebot + AMC script with clean option leaving one empty folder

Post by Zebbe152 »

Ok, will do.
Zebbe152
Posts: 12
Joined: 18 Mar 2015, 09:06

Re: Filebot + AMC script with clean option leaving one empty folder

Post by Zebbe152 »

I've been running this for two days now and it works great. You can go ahead and push a new stable release. :)
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot + AMC script with clean option leaving one empty folder

Post by rednoah »

Thanks. Script Bundle: 2018-10-05 (536) will roll out within the next 1-2 weeks.
:idea: Please read the FAQ and How to Request Help.
Post Reply