Alternatives to -revert

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
devster
Posts: 332
Joined: 06 Jun 2017, 22:56

Alternatives to -revert

Post by devster » 16 Aug 2019, 13:48

I unfortunately lost the history file, which, as far as I understand, is the only reference the -revert command uses to restore the file to its original location.
It seems feasible using a command like the following:

Code: Select all

filebot -rename --db xattr --action move --format '{original}'
provided xattr are correct and available, to move files to a specific folder with the original name, but this seems to work only on files, not folder structures.

Could I use the "{history}" binding (without the file) to rebuild also the folder they were contained in, but in a different absolute path?
Example:

Code: Select all

original:
/mnt/A/SeriesName/EpisodeName

renamed:
/mnt/output/{plex}

revert:
/media/B/SeriesName/EpisodeName
I only work in black and sometimes very, very dark grey. (Batman)

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

Re: Alternatives to -revert

Post by rednoah » 16 Aug 2019, 15:03

1.
You probably want to use -r recursive flag to process the entire input file structure.


2.
FileBot doesn't store the original file path in xattr, only the filename. So the original file path information is going to be lost.

You'll have to use --output and --format to define the absolute destination path for the reverted file.
:idea: Please read the FAQ and How to Request Help.

devster
Posts: 332
Joined: 06 Jun 2017, 22:56

Re: Alternatives to -revert

Post by devster » 16 Aug 2019, 15:37

2. Thanks, makes sense, just checking.
I only work in black and sometimes very, very dark grey. (Batman)

Post Reply