I hope this doesn’t violate the low-quality rule. For those who don’t know, when you right click an archive in Dolphin, the extract menu has a “Extract archive here, autodetect subfolder” option and its absolutely brilliant! If you’ve ever extracted a zip, tar, etc and ended up with files splattered everywhere this feature will prevent that. Basically when you choose this option it will:

  • Look to see if the archive has a top level folder, if it does, it will extract it normally
  • If it does not (so all of the files are at the top level), it will automatically create a folder for the archive and extract those top level files into it

It’s something I really wish other file managers had, and is just another one of those features from the KDE team that gives me the “The developer(s) who created this also use this in their daily lives” impression (which is not to say that others don’t). You can of course just open your favorite archive utility and manually check, then manually make the folder yourself and extract the files into there, but this lets me skip those couple of steps and I appreciate that so much.

  • Eager Eagle@lemmy.world
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    1 year ago

    no, no - the opposite is the actual problem: you extract in a non-empty folder and there’s no top directory in the archive. Now you have a bunch of files mixed up: the extracted ones and the ones that were there before you did it.

    • Miphera@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      1 year ago

      Even better when this happens on a Linux server with no GUI (bonus points if you don’t have much Linux experience yet).

      • russjr08@outpost.zeuslink.netOP
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        Honestly now I am curious if there is a CLI equivalent. I always end up using tar’s t flag or opening a zip in vim to see if it has a subfolder as my current workaround…

      • elint@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        You get Linux experience real quick when you make mistakes like that in a shell with no GUI.

        mkdir newfolder; find . -maxdepth 1 -mmin -5 -exec mv "{}" newfolder \;

        • Andy@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          If you’ll forgive my compulsion to substitute all finds with Zsh globs:

          $ for f ( ^(newfolder)(mm-5) )  mv -i $f newfolder/
          

          Assumed:

          $ mkdir -p newfolder
          $ setopt extendedglob
          
    • verysoft@kbin.social
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      1 year ago

      Ahaha yeah, it’d be fine if it was always either way for me, but I personally prefer setting my folder up and then extract the archive into there, so I don’t have to rename it or whatever after extracting. So I would rather it have all the files in the top of the archive and not in a folder.