New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to extract to folder with the same name as archive #333

Open
filliph opened this Issue Nov 24, 2018 · 9 comments

Comments

3 participants
@filliph

filliph commented Nov 24, 2018

In my opinion, it should work like this:

  • If the archive contains 1 file, preserve current behaviour and extract next to the archive
  • If the archive contains a folder, or more than one file, extract to a folder with the same name as the archive

It would be perfect if Keka could also detect if the archive contained a folder with the same name as the archive, and not create nested folders.

Thanks for considering!

@aonez

This comment has been minimized.

Owner

aonez commented Nov 25, 2018

@belazor thanks for the feedback! I'm not sure I'm getting that one right, since I think it's already the current behaviour:

  • If the extraction contains multiple files/folders, a folder nesting all the contents is created named as the compressed archive
  • If the extraction only contains one file/folder, no parent folder is created and the file/folder retains it's name, is not named as the compressed archive

Can you supply some test files so I can better understand what's the change you're proposing?

@aonez aonez self-assigned this Nov 25, 2018

@aonez aonez added this to the Look at milestone Nov 25, 2018

@filliph

This comment has been minimized.

filliph commented Nov 25, 2018

I confess I made an assumption when it came to multiple files and folders, sorry about that!

I only purchased Keka off the MAS an hour or so before submitting the feedback as The Unarchiver failed to extract the attached zip file, but Keka managed it fine.

xf-patch-2011.zip

When I extract this file, I would want Keka to create a folder named xf-patch-2011 with the src folder inside it.
Currently, with the "Extract to location" setting set to "Next to original file", it simply creates a folder src.

The primary reason why I believe this should change is that if I'm extracting a file I don't know the contents of into a large "Downloads" folder, it's not always obvious to me where exactly the resulting file(s) went.

In the case of that particular zip file, I'd need to look at the "Date Modified" column to figure it out, if the Downloads folder was large enough that the extracted "src" folder didn't spring into view.

Assuming this isn't already possible somewhere, and I'm just missing the setting, maybe a sub-option of the "Extract to location" could be added that always creates a parent folder (with the detection mentioned in the OP).

Thanks!

@no-response no-response bot removed the more info needed label Nov 25, 2018

@gingerbeardman

This comment has been minimized.

Contributor

gingerbeardman commented Nov 25, 2018

This is an interesting request.

I tested the previously attached xf-patch-2011.zip with various archiving programs and they all act in exactly the same way.

  • Keka 1.1.5
  • The Unarchiver 4.0.0 (worked fine for me)
  • BetterZip 4.2.1
  • Archive Utility (macOS) 10.10
  • Archiver 3.0.4
@gingerbeardman

This comment has been minimized.

Contributor

gingerbeardman commented Nov 25, 2018

A further thought, what if the file you were unarchiving was named src.zip?

Then the current behaviour is OK and as expected src/...
Your proposed, new behaviour would result in src/src/...

So is the real issue that the creator of the zip chose to rename the file after its creation?

@filliph

This comment has been minimized.

filliph commented Nov 25, 2018

A further thought, what if the file you were unarchiving was named src.zip?

Then the current behaviour is OK and as expected src/...
Your proposed, new behaviour would result in src/src/...

If you look in the last paragraph of the OP, I addressed this :)

So is the real issue that the creator of the zip chose to rename the file after its creation?

You could say that, but it's also true that at least on Windows, WinRAR allows you to extract to a folder named after the zip (regardless of whether it was renamed after creation):

https://i.stack.imgur.com/3BNwP.jpg
(Notice the "Extract to New Microsoft Excel Spreadsheet" entry)

@gingerbeardman

This comment has been minimized.

Contributor

gingerbeardman commented Nov 25, 2018

Yes, I have used that in the past with WinRAR and 7zip on Windows.

None of the apps in my previous list offer such an option so it would require new user interface design.

How would you see such an option being presented or activated on macOS?

@gingerbeardman

This comment has been minimized.

Contributor

gingerbeardman commented Nov 25, 2018

This also reminds me of #188 which asks for more intelligent naming of the original archive.

@filliph

This comment has been minimized.

filliph commented Nov 25, 2018

How would you see such an option being presented or activated on macOS?

Inside the "Location" fieldset in Keka preferences, underneath the "Extract to location:" drop-down, there could be a checkbox with label "Extract to sub-folder with archive name".

Alternatively, the checkbox could simply read "Extract to sub-folder" and descriptive text (such as the one found under the "Format" fieldset on the Compression tab) could elaborate, with something like "A folder with the same name as the archive will be created in the specified location."

@aonez

This comment has been minimized.

Owner

aonez commented Dec 2, 2018

When I extract this file, I would want Keka to create a folder named xf-patch-2011 with the src folder inside it.

@belazor this will be like the "Extract on xf-patch-2011 folder" for 7-Zip in Windows contextual menu. This should be easy to do :)

@aonez aonez modified the milestones: Look at, 1.2.0 Dec 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment