[DOCS] Revert files via the internal History

How-to guides, frequently asked questions, not-so-obvious features, etc
Post Reply
User avatar
rednoah
The Source
Posts: 20177
Joined: 16 Nov 2011, 08:59

[DOCS] Revert files via the internal History

Post by rednoah »

FileBot maintains a persistent history of previous move / copy / link / etc operations so you can revert them later any time.



Revert files via the GUI:

Click Image Open HistorySelect Groups or ItemsImage Revert Selection to revert selected files:
Image



Revert files via the CLI:

Revert the most recent group of files:

Code: Select all

filebot -revert
Revert the given set of files and folders:

Code: Select all

filebot -revert /path/to/files
Revert a selection of files:

Code: Select all

filebot -revert --mode interactive
Image

Print the internal history:

Code: Select all

filebot -script fn:history
Clear the internal history:

Code: Select all

filebot -clear-history
Revert files to their original names using xattr metadata instead of the internal history:

Code: Select all

filebot -rename /path/to/files --db xattr --format "{original}"




Example Usage:

Process files:

Code: Select all

$ filebot -rename *.mp4 --db TheMovieDB -non-strict --action HARDLINK --log INFO
[HARDLINK] from [Avatar.mp4] to [Avatar (2009).mp4]
View xattr metadata:

Code: Select all

$ filebot -mediainfo *.mp4 --db xattr --format "{f.name} | {original} | {type} | {id}"
Avatar (2009).mp4 | Avatar | Movie | 19995
Avatar.mp4 | Avatar | Movie | 19995
Revert files:

Code: Select all

$ filebot -revert
Revert [Avatar (2009).mp4] to [Avatar.mp4]
Confirm that the newly created hardlink has been deleted, and that xattr metadata have been removed:

Code: Select all

$ filebot -mediainfo *.mp4 --db xattr --format "{f.name} | {original} | {type} | {id}"
Avatar.mp4 | Avatar |  |
:idea: Please read the FAQ and How to Request Help.
Post Reply