* [gentoo-user] Dolphin and extracting archives, .zip at the moment.
@ 2025-01-13 3:03 Dale
2025-01-13 3:56 ` eric
0 siblings, 1 reply; 9+ messages in thread
From: Dale @ 2025-01-13 3:03 UTC (permalink / raw
To: Gentoo User
Howdy,
I think I ran into this on my old rig too. After some upgrade, I lost
the option in the right click menu. I have this issue on the new rig
and can't find anything to install that makes it work again. I
sometimes download archives. Right now, I have a lot of .zip files.
I'd like to be able to right click and chose extract here or extract to
sub-directory. I looked in Settings and Context for Dolphin and
installed everything I could find for archives but still nothing. I
also looked to see what all was installed with emerge for this feature.
It looks like I have them all installed. This is the list of installed
packages on the system.
root@Gentoo-1 / # equery list *zip*
* Searching for *zip* ...
[IP-] [ ] app-alternatives/bzip2-1:0
[IP-] [ ] app-alternatives/gzip-1:0
[IP-] [ ] app-arch/7zip-24.09:0
[IP-] [ ] app-arch/bzip2-1.0.8-r5:0/1
[IP-] [ ] app-arch/gzip-1.13-r1:0
[IP-] [ ] app-arch/p7zip-17.05-r1:0
[IP-] [ ] app-arch/unzip-6.0_p27-r1:0
[IP-] [ ] app-arch/zip-3.0-r7:0
[IP-] [ ] dev-libs/libzip-1.11.2-r1:0/5
[IP-] [ ] virtual/perl-Compress-Raw-Bzip2-2.212.0:0
root@Gentoo-1 / #
In Dolphin, I've enabled and installed everything I can find related to
any archive. They are also all checked to enable. Still, the right
click menu no longer shows the option to extract .zip or other types
I've ran into in the past.
What is the proper tool to install for this? What am I missing? I find
it hard to believe that this is no longer a option given the vast
majority of people do this sort of thing in a GUI nowadays. I have to
be missing something.
Thanks.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Dolphin and extracting archives, .zip at the moment.
2025-01-13 3:03 [gentoo-user] Dolphin and extracting archives, .zip at the moment Dale
@ 2025-01-13 3:56 ` eric
2025-01-13 4:47 ` Dale
0 siblings, 1 reply; 9+ messages in thread
From: eric @ 2025-01-13 3:56 UTC (permalink / raw
To: gentoo-user
On 1/12/25 20:03, Dale wrote:
> Howdy,
>
> I think I ran into this on my old rig too. After some upgrade, I lost
> the option in the right click menu. I have this issue on the new rig
> and can't find anything to install that makes it work again. I
> sometimes download archives. Right now, I have a lot of .zip files.
> I'd like to be able to right click and chose extract here or extract to
> sub-directory. I looked in Settings and Context for Dolphin and
> installed everything I could find for archives but still nothing. I
> also looked to see what all was installed with emerge for this feature.
> It looks like I have them all installed. This is the list of installed
> packages on the system.
>
>
> root@Gentoo-1 / # equery list *zip*
> * Searching for *zip* ...
> [IP-] [ ] app-alternatives/bzip2-1:0
> [IP-] [ ] app-alternatives/gzip-1:0
> [IP-] [ ] app-arch/7zip-24.09:0
> [IP-] [ ] app-arch/bzip2-1.0.8-r5:0/1
> [IP-] [ ] app-arch/gzip-1.13-r1:0
> [IP-] [ ] app-arch/p7zip-17.05-r1:0
> [IP-] [ ] app-arch/unzip-6.0_p27-r1:0
> [IP-] [ ] app-arch/zip-3.0-r7:0
> [IP-] [ ] dev-libs/libzip-1.11.2-r1:0/5
> [IP-] [ ] virtual/perl-Compress-Raw-Bzip2-2.212.0:0
> root@Gentoo-1 / #
>
>
>
> In Dolphin, I've enabled and installed everything I can find related to
> any archive. They are also all checked to enable. Still, the right
> click menu no longer shows the option to extract .zip or other types
> I've ran into in the past.
>
> What is the proper tool to install for this? What am I missing? I find
> it hard to believe that this is no longer a option given the vast
> majority of people do this sort of thing in a GUI nowadays. I have to
> be missing something.
>
> Thanks.
>
> Dale
>
> :-) :-)
>
Hi Dale,
Do you have "Ark" installed? I think that is the archive tool plasma
uses by default. In a post on stack exchange installing Ark worked for
one person to give dolphin the right click option to extract archives.
https://stackoverflow.com/questions/69849444/extract-here-context-menu-item-for-dolphin-file-manager
Eric
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Dolphin and extracting archives, .zip at the moment.
2025-01-13 3:56 ` eric
@ 2025-01-13 4:47 ` Dale
2025-01-13 9:10 ` Michael
0 siblings, 1 reply; 9+ messages in thread
From: Dale @ 2025-01-13 4:47 UTC (permalink / raw
To: gentoo-user
eric wrote:
> On 1/12/25 20:03, Dale wrote:
>> Howdy,
>>
>> I think I ran into this on my old rig too. After some upgrade, I lost
>> the option in the right click menu. I have this issue on the new rig
>> and can't find anything to install that makes it work again. I
>> sometimes download archives. Right now, I have a lot of .zip files.
>> I'd like to be able to right click and chose extract here or extract to
>> sub-directory. I looked in Settings and Context for Dolphin and
>> installed everything I could find for archives but still nothing. I
>> also looked to see what all was installed with emerge for this feature.
>> It looks like I have them all installed. This is the list of installed
>> packages on the system.
>>
>>
>> root@Gentoo-1 / # equery list *zip*
>> * Searching for *zip* ...
>> [IP-] [ ] app-alternatives/bzip2-1:0
>> [IP-] [ ] app-alternatives/gzip-1:0
>> [IP-] [ ] app-arch/7zip-24.09:0
>> [IP-] [ ] app-arch/bzip2-1.0.8-r5:0/1
>> [IP-] [ ] app-arch/gzip-1.13-r1:0
>> [IP-] [ ] app-arch/p7zip-17.05-r1:0
>> [IP-] [ ] app-arch/unzip-6.0_p27-r1:0
>> [IP-] [ ] app-arch/zip-3.0-r7:0
>> [IP-] [ ] dev-libs/libzip-1.11.2-r1:0/5
>> [IP-] [ ] virtual/perl-Compress-Raw-Bzip2-2.212.0:0
>> root@Gentoo-1 / #
>>
>>
>>
>> In Dolphin, I've enabled and installed everything I can find related to
>> any archive. They are also all checked to enable. Still, the right
>> click menu no longer shows the option to extract .zip or other types
>> I've ran into in the past.
>>
>> What is the proper tool to install for this? What am I missing? I find
>> it hard to believe that this is no longer a option given the vast
>> majority of people do this sort of thing in a GUI nowadays. I have to
>> be missing something.
>>
>> Thanks.
>>
>> Dale
>>
>> :-) :-)
>>
>
> Hi Dale,
>
> Do you have "Ark" installed? I think that is the archive tool plasma
> uses by default. In a post on stack exchange installing Ark worked for
> one person to give dolphin the right click option to extract archives.
>
> https://stackoverflow.com/questions/69849444/extract-here-context-menu-item-for-dolphin-file-manager
>
>
> Eric
>
>
That seems to be the thing I was missing. I was running out of hair
over here. LOL Once I installed that, the option appeared. I didn't
even have to restart Dolphin. I did notice there is no option to
extract to a sub-directory tho. May have to look into that some more.
May be a option or something.
Thanks much.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Dolphin and extracting archives, .zip at the moment.
2025-01-13 4:47 ` Dale
@ 2025-01-13 9:10 ` Michael
2025-01-13 14:17 ` Dale
0 siblings, 1 reply; 9+ messages in thread
From: Michael @ 2025-01-13 9:10 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2819 bytes --]
On Monday 13 January 2025 04:47:39 Greenwich Mean Time Dale wrote:
> eric wrote:
> > On 1/12/25 20:03, Dale wrote:
> >> Howdy,
> >>
> >> I think I ran into this on my old rig too. After some upgrade, I lost
> >> the option in the right click menu. I have this issue on the new rig
> >> and can't find anything to install that makes it work again. I
> >> sometimes download archives. Right now, I have a lot of .zip files.
> >> I'd like to be able to right click and chose extract here or extract to
> >> sub-directory. I looked in Settings and Context for Dolphin and
> >> installed everything I could find for archives but still nothing. I
> >> also looked to see what all was installed with emerge for this feature.
> >> It looks like I have them all installed. This is the list of installed
> >> packages on the system.
> >>
> >>
> >> root@Gentoo-1 / # equery list *zip*
> >> * Searching for *zip* ...
> >> [IP-] [ ] app-alternatives/bzip2-1:0
> >> [IP-] [ ] app-alternatives/gzip-1:0
> >> [IP-] [ ] app-arch/7zip-24.09:0
> >> [IP-] [ ] app-arch/bzip2-1.0.8-r5:0/1
> >> [IP-] [ ] app-arch/gzip-1.13-r1:0
> >> [IP-] [ ] app-arch/p7zip-17.05-r1:0
> >> [IP-] [ ] app-arch/unzip-6.0_p27-r1:0
> >> [IP-] [ ] app-arch/zip-3.0-r7:0
> >> [IP-] [ ] dev-libs/libzip-1.11.2-r1:0/5
> >> [IP-] [ ] virtual/perl-Compress-Raw-Bzip2-2.212.0:0
> >> root@Gentoo-1 / #
> >>
> >>
> >>
> >> In Dolphin, I've enabled and installed everything I can find related to
> >> any archive. They are also all checked to enable. Still, the right
> >> click menu no longer shows the option to extract .zip or other types
> >> I've ran into in the past.
> >>
> >> What is the proper tool to install for this? What am I missing? I find
> >> it hard to believe that this is no longer a option given the vast
> >> majority of people do this sort of thing in a GUI nowadays. I have to
> >> be missing something.
> >>
> >> Thanks.
> >>
> >> Dale
> >>
> >> :-) :-)
> >
> > Hi Dale,
> >
> > Do you have "Ark" installed? I think that is the archive tool plasma
> > uses by default. In a post on stack exchange installing Ark worked for
> > one person to give dolphin the right click option to extract archives.
> >
> > https://stackoverflow.com/questions/69849444/extract-here-context-menu-ite
> > m-for-dolphin-file-manager
> >
> >
> > Eric
>
> That seems to be the thing I was missing. I was running out of hair
> over here. LOL Once I installed that, the option appeared. I didn't
> even have to restart Dolphin. I did notice there is no option to
> extract to a sub-directory tho. May have to look into that some more.
> May be a option or something.
>
> Thanks much.
>
> Dale
>
> :-) :-)
Ark is brought in by kde-apps/kdeutils-meta as a dependency. Have you not
installed kde-apps/kdeutils-meta?
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Dolphin and extracting archives, .zip at the moment.
2025-01-13 9:10 ` Michael
@ 2025-01-13 14:17 ` Dale
2025-01-13 18:37 ` Michael
0 siblings, 1 reply; 9+ messages in thread
From: Dale @ 2025-01-13 14:17 UTC (permalink / raw
To: gentoo-user
Michael wrote:
> On Monday 13 January 2025 04:47:39 Greenwich Mean Time Dale wrote:
>> eric wrote:
>>> On 1/12/25 20:03, Dale wrote:
>>>> Howdy,
>>>>
>>>> I think I ran into this on my old rig too. After some upgrade, I lost
>>>> the option in the right click menu. I have this issue on the new rig
>>>> and can't find anything to install that makes it work again. I
>>>> sometimes download archives. Right now, I have a lot of .zip files.
>>>> I'd like to be able to right click and chose extract here or extract to
>>>> sub-directory. I looked in Settings and Context for Dolphin and
>>>> installed everything I could find for archives but still nothing. I
>>>> also looked to see what all was installed with emerge for this feature.
>>>> It looks like I have them all installed. This is the list of installed
>>>> packages on the system.
>>>>
>>>>
>>>> root@Gentoo-1 / # equery list *zip*
>>>> * Searching for *zip* ...
>>>> [IP-] [ ] app-alternatives/bzip2-1:0
>>>> [IP-] [ ] app-alternatives/gzip-1:0
>>>> [IP-] [ ] app-arch/7zip-24.09:0
>>>> [IP-] [ ] app-arch/bzip2-1.0.8-r5:0/1
>>>> [IP-] [ ] app-arch/gzip-1.13-r1:0
>>>> [IP-] [ ] app-arch/p7zip-17.05-r1:0
>>>> [IP-] [ ] app-arch/unzip-6.0_p27-r1:0
>>>> [IP-] [ ] app-arch/zip-3.0-r7:0
>>>> [IP-] [ ] dev-libs/libzip-1.11.2-r1:0/5
>>>> [IP-] [ ] virtual/perl-Compress-Raw-Bzip2-2.212.0:0
>>>> root@Gentoo-1 / #
>>>>
>>>>
>>>>
>>>> In Dolphin, I've enabled and installed everything I can find related to
>>>> any archive. They are also all checked to enable. Still, the right
>>>> click menu no longer shows the option to extract .zip or other types
>>>> I've ran into in the past.
>>>>
>>>> What is the proper tool to install for this? What am I missing? I find
>>>> it hard to believe that this is no longer a option given the vast
>>>> majority of people do this sort of thing in a GUI nowadays. I have to
>>>> be missing something.
>>>>
>>>> Thanks.
>>>>
>>>> Dale
>>>>
>>>> :-) :-)
>>> Hi Dale,
>>>
>>> Do you have "Ark" installed? I think that is the archive tool plasma
>>> uses by default. In a post on stack exchange installing Ark worked for
>>> one person to give dolphin the right click option to extract archives.
>>>
>>> https://stackoverflow.com/questions/69849444/extract-here-context-menu-ite
>>> m-for-dolphin-file-manager
>>>
>>>
>>> Eric
>> That seems to be the thing I was missing. I was running out of hair
>> over here. LOL Once I installed that, the option appeared. I didn't
>> even have to restart Dolphin. I did notice there is no option to
>> extract to a sub-directory tho. May have to look into that some more.
>> May be a option or something.
>>
>> Thanks much.
>>
>> Dale
>>
>> :-) :-)
> Ark is brought in by kde-apps/kdeutils-meta as a dependency. Have you not
> installed kde-apps/kdeutils-meta?
I hadn't but I have now. While I got the option back, it isn't working
like it used too. The way I used to do it, I select extract to sub
directory. That comes in handy when you have lots of .zip or .tar files
to extract. What it does is create a new directory with the same name,
less the extension, as the original .zip or .tar file and then puts the
extracted files inside that directory. It repeats for every .zip file.
On this new thing, I selected Extract to and in the next window I
selected Extraction into subfolder. Thing is, if I have more than one
.zip file, it puts ALL the contents of ALL .zip files into ONE
directory, overwriting/renaming etc duplicates. That's not what I
want. I did a search, I found someone else with the same complaint. I
didn't find a proper way to accomplish the same thing it used to do tho.
I tried to figure out how to do this on the command line but my head
hurts. Banging that wall isn't any fun.
Anyone been able to figure out how to do this? I got a few hundred .zip
files and doing them one by one just isn't a good option.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Dolphin and extracting archives, .zip at the moment.
2025-01-13 14:17 ` Dale
@ 2025-01-13 18:37 ` Michael
2025-01-14 13:06 ` Dale
0 siblings, 1 reply; 9+ messages in thread
From: Michael @ 2025-01-13 18:37 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 5074 bytes --]
On Monday 13 January 2025 14:17:41 Greenwich Mean Time Dale wrote:
> Michael wrote:
> > On Monday 13 January 2025 04:47:39 Greenwich Mean Time Dale wrote:
> >> eric wrote:
> >>> On 1/12/25 20:03, Dale wrote:
> >>>> Howdy,
> >>>>
> >>>> I think I ran into this on my old rig too. After some upgrade, I lost
> >>>> the option in the right click menu. I have this issue on the new rig
> >>>> and can't find anything to install that makes it work again. I
> >>>> sometimes download archives. Right now, I have a lot of .zip files.
> >>>> I'd like to be able to right click and chose extract here or extract to
> >>>> sub-directory. I looked in Settings and Context for Dolphin and
> >>>> installed everything I could find for archives but still nothing. I
> >>>> also looked to see what all was installed with emerge for this feature.
> >>>> It looks like I have them all installed. This is the list of installed
> >>>> packages on the system.
> >>>>
> >>>>
> >>>> root@Gentoo-1 / # equery list *zip*
> >>>>
> >>>> * Searching for *zip* ...
> >>>>
> >>>> [IP-] [ ] app-alternatives/bzip2-1:0
> >>>> [IP-] [ ] app-alternatives/gzip-1:0
> >>>> [IP-] [ ] app-arch/7zip-24.09:0
> >>>> [IP-] [ ] app-arch/bzip2-1.0.8-r5:0/1
> >>>> [IP-] [ ] app-arch/gzip-1.13-r1:0
> >>>> [IP-] [ ] app-arch/p7zip-17.05-r1:0
> >>>> [IP-] [ ] app-arch/unzip-6.0_p27-r1:0
> >>>> [IP-] [ ] app-arch/zip-3.0-r7:0
> >>>> [IP-] [ ] dev-libs/libzip-1.11.2-r1:0/5
> >>>> [IP-] [ ] virtual/perl-Compress-Raw-Bzip2-2.212.0:0
> >>>> root@Gentoo-1 / #
> >>>>
> >>>>
> >>>>
> >>>> In Dolphin, I've enabled and installed everything I can find related to
> >>>> any archive. They are also all checked to enable. Still, the right
> >>>> click menu no longer shows the option to extract .zip or other types
> >>>> I've ran into in the past.
> >>>>
> >>>> What is the proper tool to install for this? What am I missing? I
> >>>> find
> >>>> it hard to believe that this is no longer a option given the vast
> >>>> majority of people do this sort of thing in a GUI nowadays. I have to
> >>>> be missing something.
> >>>>
> >>>> Thanks.
> >>>>
> >>>> Dale
> >>>>
> >>>> :-) :-)
> >>>
> >>> Hi Dale,
> >>>
> >>> Do you have "Ark" installed? I think that is the archive tool plasma
> >>> uses by default. In a post on stack exchange installing Ark worked for
> >>> one person to give dolphin the right click option to extract archives.
> >>>
> >>> https://stackoverflow.com/questions/69849444/extract-here-context-menu-i
> >>> te
> >>> m-for-dolphin-file-manager
> >>>
> >>>
> >>> Eric
> >>
> >> That seems to be the thing I was missing. I was running out of hair
> >> over here. LOL Once I installed that, the option appeared. I didn't
> >> even have to restart Dolphin. I did notice there is no option to
> >> extract to a sub-directory tho. May have to look into that some more.
> >> May be a option or something.
> >>
> >> Thanks much.
> >>
> >> Dale
> >>
> >> :-) :-)
> >
> > Ark is brought in by kde-apps/kdeutils-meta as a dependency. Have you not
> > installed kde-apps/kdeutils-meta?
>
> I hadn't but I have now. While I got the option back, it isn't working
> like it used too. The way I used to do it, I select extract to sub
> directory.
It does this by default when you select to 'Extract here'. For example, the
archive foo.zip will be extracted into a new directory called foo/ and all
compressed files in foo.zip will be extracted into foo/.
If you do this a second time, it will create a new directory foo(1)/ and
extract the compressed files in there so as to not overwrite the previously
extracted files in foo/.
> That comes in handy when you have lots of .zip or .tar files
> to extract. What it does is create a new directory with the same name,
> less the extension, as the original .zip or .tar file and then puts the
> extracted files inside that directory. It repeats for every .zip file.
> On this new thing, I selected Extract to and in the next window I
> selected Extraction into subfolder. Thing is, if I have more than one
> .zip file, it puts ALL the contents of ALL .zip files into ONE
> directory, overwriting/renaming etc duplicates. That's not what I
> want. I did a search, I found someone else with the same complaint. I
> didn't find a proper way to accomplish the same thing it used to do tho.
You can type in what you want to call the new subdirectory (options shown in
top right of the pop up) so as to not overwrite existing subdirectories/files.
> I tried to figure out how to do this on the command line but my head
> hurts. Banging that wall isn't any fun.
I don't think a single command can achieve this. Unzip will ask if you want
to overwrite files already extracted in a previous attempt and it will create
a directory to store the extracted files if one does not exist, but it will
not ask to rename an existing directory.
> Anyone been able to figure out how to do this? I got a few hundred .zip
> files and doing them one by one just isn't a good option.
>
> Dale
>
> :-) :-)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Dolphin and extracting archives, .zip at the moment.
2025-01-13 18:37 ` Michael
@ 2025-01-14 13:06 ` Dale
2025-01-14 15:46 ` Frank Steinmetzger
0 siblings, 1 reply; 9+ messages in thread
From: Dale @ 2025-01-14 13:06 UTC (permalink / raw
To: gentoo-user
Michael wrote:
> On Monday 13 January 2025 14:17:41 Greenwich Mean Time Dale wrote:
>>
> It does this by default when you select to 'Extract here'. For example, the
> archive foo.zip will be extracted into a new directory called foo/ and all
> compressed files in foo.zip will be extracted into foo/.
>
> If you do this a second time, it will create a new directory foo(1)/ and
> extract the compressed files in there so as to not overwrite the previously
> extracted files in foo/.
>
That seems to work like the old way. I guess the default changed but it
didn't make sense given how it used to work.
>> That comes in handy when you have lots of .zip or .tar files
>> to extract. What it does is create a new directory with the same name,
>> less the extension, as the original .zip or .tar file and then puts the
>> extracted files inside that directory. It repeats for every .zip file.
>> On this new thing, I selected Extract to and in the next window I
>> selected Extraction into subfolder. Thing is, if I have more than one
>> .zip file, it puts ALL the contents of ALL .zip files into ONE
>> directory, overwriting/renaming etc duplicates. That's not what I
>> want. I did a search, I found someone else with the same complaint. I
>> didn't find a proper way to accomplish the same thing it used to do tho.
> You can type in what you want to call the new subdirectory (options shown in
> top right of the pop up) so as to not overwrite existing subdirectories/files.
>
I may have to play with that some more. Sometimes, I have to see it to
figure out what it is doing.
>> I tried to figure out how to do this on the command line but my head
>> hurts. Banging that wall isn't any fun.
> I don't think a single command can achieve this. Unzip will ask if you want
> to overwrite files already extracted in a previous attempt and it will create
> a directory to store the extracted files if one does not exist, but it will
> not ask to rename an existing directory.
>
>
>> Anyone been able to figure out how to do this? I got a few hundred .zip
>> files and doing them one by one just isn't a good option.
>>
>> Dale
>>
>> :-) :-)
I figured if there was a command line way, it would require sed, awk,
find and other things I don't understand. It didn't take me long to
figure out the command line way was harder than trying to figure out the
GUI way.
Thanks much.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Dolphin and extracting archives, .zip at the moment.
2025-01-14 13:06 ` Dale
@ 2025-01-14 15:46 ` Frank Steinmetzger
2025-01-17 7:01 ` Dale
0 siblings, 1 reply; 9+ messages in thread
From: Frank Steinmetzger @ 2025-01-14 15:46 UTC (permalink / raw
To: gentoo-user
Am Tue, Jan 14, 2025 at 07:06:16AM -0600 schrieb Dale:
> Michael wrote:
> > On Monday 13 January 2025 14:17:41 Greenwich Mean Time Dale wrote:
> >>
> > It does this by default when you select to 'Extract here'. For example, the
> > archive foo.zip will be extracted into a new directory called foo/ and all
> > compressed files in foo.zip will be extracted into foo/.
> > […]
>
> That seems to work like the old way. I guess the default changed but it
> didn't make sense given how it used to work.
I thought it would behave like you expected – always create a subdir for
each ZIP. I could reproduce that it does not. So I looked at Ark’s settings:
there is an option to create a subdirectory for a ZIP as soon as the zip
contains more than one item. So it is still there, but not for every file.
> >> I tried to figure out how to do this on the command line but my head
> >> hurts. Banging that wall isn't any fun.
> > I don't think a single command can achieve this. Unzip will ask if you want
> > to overwrite files already extracted in a previous attempt and it will create
> > a directory to store the extracted files if one does not exist, but it will
> > not ask to rename an existing directory.
> >
> >
> >> Anyone been able to figure out how to do this? I got a few hundred .zip
> >> files and doing them one by one just isn't a good option.
> >>
> >> Dale
> >>
> >> :-) :-)
>
>
> I figured if there was a command line way, it would require sed, awk,
> find and other things I don't understand.
Don’t give one-liners more credit than they’re due. All you need is a
for-loop over all ZIP files, calculate an ouput dir by removing the trailing
“.zip”, and finally call unzip with both:
for z in *.zip; do unzip "$z" -d "${z%.zip}"; done
If you want to be smart, omit the extraction if the output directory already
exists, to avoid overwriting stuff:
# for-loop: cut off ".zip" does dir exist? yes no
for z in *.zip; do d="${z%.zip}"; [ -d "$d" ] && echo "Skipping $z" || unzip "$z" -d "$d"; done
--
Grüße | Greetings | Salut | Qapla’
Please do not share anything from, with or about me on any social network.
...llaw eht no rorrim ,rorriM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Dolphin and extracting archives, .zip at the moment.
2025-01-14 15:46 ` Frank Steinmetzger
@ 2025-01-17 7:01 ` Dale
0 siblings, 0 replies; 9+ messages in thread
From: Dale @ 2025-01-17 7:01 UTC (permalink / raw
To: gentoo-user
Frank Steinmetzger wrote:
> Am Tue, Jan 14, 2025 at 07:06:16AM -0600 schrieb Dale:
>> Michael wrote:
>>> On Monday 13 January 2025 14:17:41 Greenwich Mean Time Dale wrote:
>>> It does this by default when you select to 'Extract here'. For example, the
>>> archive foo.zip will be extracted into a new directory called foo/ and all
>>> compressed files in foo.zip will be extracted into foo/.
>>> […]
>> That seems to work like the old way. I guess the default changed but it
>> didn't make sense given how it used to work.
> I thought it would behave like you expected – always create a subdir for
> each ZIP. I could reproduce that it does not. So I looked at Ark’s settings:
> there is an option to create a subdirectory for a ZIP as soon as the zip
> contains more than one item. So it is still there, but not for every file.
>
>>>> I tried to figure out how to do this on the command line but my head
>>>> hurts. Banging that wall isn't any fun.
>>> I don't think a single command can achieve this. Unzip will ask if you want
>>> to overwrite files already extracted in a previous attempt and it will create
>>> a directory to store the extracted files if one does not exist, but it will
>>> not ask to rename an existing directory.
>>>
>>>
>>>> Anyone been able to figure out how to do this? I got a few hundred .zip
>>>> files and doing them one by one just isn't a good option.
>>>>
>>>> Dale
>>>>
>>>> :-) :-)
>>
>> I figured if there was a command line way, it would require sed, awk,
>> find and other things I don't understand.
> Don’t give one-liners more credit than they’re due. All you need is a
> for-loop over all ZIP files, calculate an ouput dir by removing the trailing
> “.zip”, and finally call unzip with both:
>
> for z in *.zip; do unzip "$z" -d "${z%.zip}"; done
>
> If you want to be smart, omit the extraction if the output directory already
> exists, to avoid overwriting stuff:
>
> # for-loop: cut off ".zip" does dir exist? yes no
> for z in *.zip; do d="${z%.zip}"; [ -d "$d" ] && echo "Skipping $z" || unzip "$z" -d "$d"; done
>
Well, that went right over my head. Been reading that on occasion the
past day or so and still not sure, despite your notes, how that works.
I'm glad the GUI one works. :-D
Dale
:-) :-)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-01-17 7:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 3:03 [gentoo-user] Dolphin and extracting archives, .zip at the moment Dale
2025-01-13 3:56 ` eric
2025-01-13 4:47 ` Dale
2025-01-13 9:10 ` Michael
2025-01-13 14:17 ` Dale
2025-01-13 18:37 ` Michael
2025-01-14 13:06 ` Dale
2025-01-14 15:46 ` Frank Steinmetzger
2025-01-17 7:01 ` Dale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox