I realize this was from ten years ago...rednoah wrote: ↑13 Nov 2012, 12:41 Description:
FileBot keeps an internal history of all rename operations in case you want to revert files to their original names or just want to find out the original name of a given file. Here's a script to help with that.
Print old and new names in rows for easy comparison:Options:Code: Select all
filebot -script fn:history --format '${from.name}\n${to.name}\n'
--format specify your own line format
I tried this on macOS and it fails to create new lines in output. It seems to use tabs instead of new lines.
I am wondering if it's related to how sed has trouble replacing a space with a newline?
I can use:
Code: Select all
$ filebot -script fn:history --format '${from.name}\t${to.name}\t' | grep -v "\.srt" > history.txt
$ tr "\t" "\n" </Users/john/history.txt >/Users/john/historytemp.txt && mv /Users/john/historytemp.txt /Users/john/history.txt
$ cat "history.txt" | sed 's!.*/!!'
The.Greatest.Show.on.Earth.1952.1080p.BluRay.x265-RARBG.mp4
The Greatest Show on Earth (1952) {imdb-tt0044672} [[en] 1.370 WS 1080p BluRay x265 493BF762].mp4
