Skip to content
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

Closed
filliph opened this issue Nov 24, 2018 · 13 comments
Closed

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

filliph opened this issue Nov 24, 2018 · 13 comments

Comments

@filliph
Copy link

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
Copy link
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
Copy link
Author

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!

@gingerbeardman
Copy link
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
Copy link
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
Copy link
Author

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
Copy link
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
Copy link
Contributor

gingerbeardman commented Nov 25, 2018

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

@filliph
Copy link
Author

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
Copy link
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.

@filliph 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
@aonez aonez modified the milestones: 1.2.0, 1.3.0 May 7, 2020
@aonez aonez added the fixed label Jun 5, 2020
@aonez aonez modified the milestones: 1.3.0, 1.2.0 Jun 5, 2020
@aonez
Copy link
Owner

aonez commented Jun 5, 2020

Coming in the next 1.2.0 beta:

Screenshot 2020-06-05 at 11 56 40

@filliph
Copy link
Author

filliph commented Jun 5, 2020

Shouldn't that be "Extract to" rather than "Extract on", like WinRAR in my previous screenshot #333 (comment)? :)

@aonez
Copy link
Owner

aonez commented Jun 6, 2020

You're right @filliph, I always get confused with "on, to, in"...

@aonez
Copy link
Owner

aonez commented Jun 10, 2020

Released in the latest dev build: v1.2.0-dev.3901

@aonez aonez closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants