Results 1 to 8 of 8

Thread: Batch convert .cbr to .cbz

  1. #1
    Join Date
    May 2014
    Beans
    6

    Batch convert .cbr to .cbz

    Hello there! I found this thread, but I can't really get it to work 'cuz the links are dead: https://ubuntuforums.org/showthread.php?t=1273762
    I need to convert .cbr files to .cbz because my tablet software can't read .cbr, thank you for any help.
    I also found this (https://github.com/oogg06/cbr2cbz) but I don't want to rename all my files.
    Last edited by Juanchi-09; 1 Week Ago at 03:56 PM.

  2. #2
    Join Date
    Dec 2014
    Beans
    1,832

    Re: Batch convert .cbr to .cbz

    Post #5 in the thread you link to contains the complete script. I don't see the problem. Copy and paste into your favorite editor, save as 'cbr2cbz' in either ~/.local/bin or ~/bin so the script is in the path and make it executable ('chmod u+x ~/bin/cbr2cbz' in a shell).

    Alternatively you could use a viewer that supports cbr; I use Perfect Viewer in the free version on Android and it does the job.

    Holger

  3. #3
    Join Date
    May 2014
    Beans
    6

    Re: Batch convert .cbr to .cbz

    I can't use any other viewer, the tablet is so old I had to resort to old apk versions and stuff. I have no idea what I'd done wrong with the script, but now it works like a charm. Thank you!

  4. #4
    Join Date
    May 2010
    Beans
    1,589

    Re: Batch convert .cbr to .cbz

    Please remember to flag the post as solved

  5. #5
    Join Date
    May 2014
    Beans
    6

    Re: Batch convert .cbr to .cbz

    Ah, I was about to, but then I had another question, if I may. Is it possible to apply this recursively to all subfolders and to delete the .cbr files after conversion? Thank you.

  6. #6
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,282
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Batch convert .cbr to .cbz

    Try this. cd to the top-level folder containing the cbr files, then:
    Code:
    find -type f -name '*cbr' -exec cbr2cbz '{}' \;

  7. #7
    Join Date
    May 2014
    Beans
    6

    Re: Batch convert .cbr to .cbz

    Quote Originally Posted by The Cog View Post
    Try this. cd to the top-level folder containing the cbr files, then:
    Code:
    find -type f -name '*cbr' -exec cbr2cbz '{}' \;
    Thank you. Any difference with for a in *.cbr;do cbr2cbz "$a";done?
    Anyways, this is solved!

  8. #8
    Join Date
    Dec 2009
    Beans
    192

    Re: Batch convert .cbr to .cbz

    Quote Originally Posted by Juanchi-09 View Post
    Thank you. Any difference with for a in *.cbr;do cbr2cbz "$a";done?
    Anyways, this is solved!
    As it is a for loop will work only in the current directory, whereas find will descend recursively down the directory tree. 'Find' is a very powerful tool.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •