[CLI] How to process generic non-media files?

Any questions? Need some help?
Post Reply
Ccooluke
Posts: 4
Joined: 25 Apr 2018, 04:21

[CLI] How to process generic non-media files?

Post by Ccooluke »

So I’ve tried a couple times to understand how the AMC script works. I really don’t get it unfortunately. All I want to use filebot for is to automate renaming cbr/cbz (comic) files.
So, I have a preset for DC comics that I download as a batch, I place them in one folder and run this preset:

Code: Select all

Y:/Comics/DC Comics/005 Rebirth/{n.before(' [0-9]')}/{fn.replaceAll(/\(.*\)/, '')}
So this sorts and renames at the same time. I just want to be able to automatically run this after the torrent is finished downloading, but I can’t figure out the script equivalent to the preset. Can someone please help or point me in the right direction? Thank you!
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can I make a preset a script?

Post by rednoah »

1.
The amc script does not support cbr/cbz (comic) files, so most likely, files will either be ignored, or processed like any other generic file that can't be sorted, depending on your options.


2.
If you're using the GUI, then this thread will be helpful:
viewtopic.php?f=3&t=2072

If you're using the CLI, either manually calling commands, or having your torrent client call commands on download complete, then you can use filebot -rename --db xattr -non-strict like so:

Code: Select all

$ filebot -rename *.cbr --db xattr -non-strict --format "{fn.upper().space('_')}" --action TEST
Rename files using [Extended Attributes]
[TEST] from [Comic 1.cbr] to [COMIC_1.cbr]
Processed 1 files
--db xattr is use for offline processing of files using previously written xattr metdata. -non-strict enables processing of plain files even if they don't have any xattr metadata.
:idea: Please read the FAQ and How to Request Help.
Ccooluke
Posts: 4
Joined: 25 Apr 2018, 04:21

Re: [CLI] How to process generic non-media files?

Post by Ccooluke »

Thanks this really helps out a lot.
Post Reply