Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Easy way to unpack a package?

9 views
Skip to first unread message

J. J. Lodder

unread,
May 15, 2022, 7:12:45 AM5/15/22
to
As we know some files are package, that is,
they are really folders disguised as files.
(an .epub for example can be both)

If so, a right click will give the option: 'show package contents'.
One can convert packages to folders by having two windows open,
show contents, and drag the contents of the package
to a folder in another window.
(or create a new folder in the package, and drag that)

Fine, but this is cumbersome.
Is there a direct way to convert a package to a folder
(with the same name and contents)
without going through intermediate steps?

Jan

David Brooks

unread,
May 15, 2022, 11:14:54 AM5/15/22
to
Hello Jan

Pacifist is a powerful multi-tool for working with macOS package files,
disk images, and file archives. Using Pacifist, you can:

open a wide variety of file archives, including:
macOS .pkg package files,
.dmg disk images,
macOS asset catalogs,
Mac OS 9 Installer Tome files, and
.zip, .tar, .tar.gz, .tar.bz2, .xar, and .yaa archives,
examine and extract individual files and folders,
inspect install scripts and other package resources to make sure that a
package is trustworthy before installing it,
analyze existing installations on your system, to help you determine who
installed a particular file on your system,
view archive contents straight from the Finder via QuickLook,
view and extract files from archives via your choice of a slick GUI or
an automation-friendly command-line interface, and even
inspect the contents of .zip files (and other supported types) over the
Web without downloading the entire archive first.
For version 4, Pacifist has been rewritten from the ground up in Swift 5
with a focus on multi-threadedness, resulting in a lot of performance
and user-experience improvements.

Pacifist is compatible with macOS 10.10.3 and higher, including macOS 12
“Monterey.” Pacifist is optimized for Apple Silicon, and also works on
64-bit Intel™ processors.

Details, here:- https://www.charlessoft.com

Richard Tobin

unread,
May 15, 2022, 12:55:02 PM5/15/22
to
In article <1przyo8.1kva7271g82liaN%nos...@de-ster.demon.nl>,
J. J. Lodder <jjl...@xs4all.nl> wrote:

>Is there a direct way to convert a package to a folder
>(with the same name and contents)
>without going through intermediate steps?

Rename it to have a different extension.

If I create a directory whose name is anything.epub, it magically
acquires the kMDItemContentType "org.idpf.epub-folder" and appears
in the Finder as a package:

kremvax$ mkdir test.epub
kremvax$ mdls -name kMDItemContentType test.epub
kMDItemContentType = "org.idpf.epub-folder"

kremvax$ mv test.epub test.xyz
kremvax$ mdls -name kMDItemContentType test.xyz
kMDItemContentType = "public.folder"

-- Richard

J. J. Lodder

unread,
May 15, 2022, 3:41:37 PM5/15/22
to
That works, thanks.
That is no doubt how some of those fake .epub files
became packages.

To be fair, the Finder does put up a warning,
if you have warnings about changing extensions set.
('may appear as a single file')

Addition: This auto-packaging doesn't work with all 'extensions',
only with those extensions that the Finder knows about. [1]

BTW, is this general?
Is it true that a package is nothing but a folder with an extension,
and the other way round?

Jan

[1] The finder does NOT think
that everthing behind the last . must be an extension.
Some third party apps, for example ABFR do think so.
(which allows for some useful renaming tricks)

J. J. Lodder

unread,
May 15, 2022, 3:57:05 PM5/15/22
to
David Brooks <D...@nomail.afraid.org> wrote:

> On 15/05/2022 12:12, J. J. Lodder wrote:
> > As we know some files are package, that is,
> > they are really folders disguised as files.
> > (an .epub for example can be both)
> >
> > If so, a right click will give the option: 'show package contents'.
> > One can convert packages to folders by having two windows open,
> > show contents, and drag the contents of the package
> > to a folder in another window.
> > (or create a new folder in the package, and drag that)
> >
> > Fine, but this is cumbersome.
> > Is there a direct way to convert a package to a folder
> > (with the same name and contents)
> > without going through intermediate steps?
>
> Hello Jan
>
> Pacifist is a powerful multi-tool for working with macOS package files,
> disk images, and file archives. Using Pacifist, you can:

Thanks, but I don't think Pacifist will easily deal
with the unpackaging problem.

I solved the problem once and for all using good old File Buddy.
This allows you to find all files which are packages.
(while excluding the obvious ones such as .app, or .rftd)

Jan


David Brooks

unread,
May 15, 2022, 6:31:07 PM5/15/22
to
On 15/05/2022 20:57, J. J. Lodder wrote:
> David Brooks <D...@nomail.afraid.org> wrote:
>
>> On 15/05/2022 12:12, J. J. Lodder wrote:
>>> As we know some files are package, that is,
>>> they are really folders disguised as files.
>>> (an .epub for example can be both)
>>>
>>> If so, a right click will give the option: 'show package contents'.
>>> One can convert packages to folders by having two windows open,
>>> show contents, and drag the contents of the package
>>> to a folder in another window.
>>> (or create a new folder in the package, and drag that)
>>>
>>> Fine, but this is cumbersome.
>>> Is there a direct way to convert a package to a folder
>>> (with the same name and contents)
>>> without going through intermediate steps?
>>
>> Hello Jan
>>
>> Pacifist is a powerful multi-tool for working with macOS package files,
>> disk images, and file archives. Using Pacifist, you can:
>
> Thanks, but I don't think Pacifist will easily deal
> with the unpackaging problem.

Really? Did you even try it? It's free to experiment! (shareware)

> I solved the problem once and for all using good old File Buddy.
> This allows you to find all files which are packages.
> (while excluding the obvious ones such as .app, or .rftd)

I'm pleased that you achieved your objective. :-D

J. J. Lodder

unread,
May 16, 2022, 4:23:28 AM5/16/22
to
There is nothing like good old File Buddy
for a great many file handling tasks.
Unfortunately, after five years,
the complete rewrite as File Buddy v11
is still in the alpha stage.

No problem, just run it on an old Mac Mini,
just like MacSoup,

Jan


Richard Tobin

unread,
May 16, 2022, 7:40:03 AM5/16/22
to
In article <1ps0ll6.xzq1at16dkko6N%nos...@de-ster.demon.nl>,
J. J. Lodder <jjl...@xs4all.nl> wrote:
>Is it true that a package is nothing but a folder with an extension,
>and the other way round?

As far as I can see - and I could be wrong - a folder is recognised as
a package if its kMDItemContentType is set to something the Finder
knows is a package type. That gets set by the system when you create
a folder with a konwn extension. I think it should be possible to
change the content type without changing the extension, but it will
get set back again if for any reason the system regenerates the
metadata.

-- Richard

David Brooks

unread,
May 16, 2022, 7:47:52 AM5/16/22
to
Why would I wish to run /anything/ on old and out-of-date equipment?

What can you do using same which I cannot/could not do on my current
iMac running macOS Monterey?

I'm curious! ;-)

J. J. Lodder

unread,
May 16, 2022, 10:28:23 AM5/16/22
to
Because it has unique capabilities that nothing on your iMac can match,

Jan

J. J. Lodder

unread,
May 16, 2022, 10:28:24 AM5/16/22
to
So could I.
Anyway, the problem is solved for all practical purposes,
and I will leave it at that.
No time for the possible subtleties.

Thanks again,

Jan





whisky-dave

unread,
May 16, 2022, 10:29:32 AM5/16/22
to
Play starcraft, carmeggedon to name just 2 of my favourite games.

David Brooks

unread,
May 16, 2022, 10:33:32 AM5/16/22
to

J. J. Lodder

unread,
May 16, 2022, 11:51:04 AM5/16/22
to
TimS <timst...@greenbee.net> wrote:
> You couldn't run my 35mm slide scanner. I keep an old Mini kicking around for
> the purpose.

Some people even keep a SCSI Mac alive,
just to keep a Nikon CoolScan running,

Jan

David Brooks

unread,
May 16, 2022, 11:54:44 AM5/16/22
to
On 16/05/2022 15:59, TimS wrote:
> You couldn't run my 35mm slide scanner. I keep an old Mini kicking around for
> the purpose.

Understood. Thanks for so advising.

There might well be a modern 35mm slide scanner which WILL work with
macOS Monterey.

Andy Hewitt

unread,
May 16, 2022, 12:54:17 PM5/16/22
to
On 16/05/2022 17:25, Alan B wrote:
> J. J. Lodder <nos...@de-ster.demon.nl> wrote:
>
>> Some people even keep a SCSI Mac alive,
>> just to keep a Nikon CoolScan running,
>
> Also useful to keep an old Mac or macOS alive to run wonderful 32-bit
> apps such as MacSOUP. No-one shoukd be intimidated or shamed into
> upgrading their OS if they don't want or need to. As my Macs are pretty
> new and fast I do keep them up to date but I also run Mojave and Windows
> XP virtual machines to run older apps.

I'm still using my old 2013 iMac on Cataline here. My main device is a
2020 iPad Pro, which I'm happy enough with - probably should have got a
laptop, but in reality, the iPad has worked flawlessly, and without any
speed issues, and does all I need it too (and a lot more).

Of course the iMac is stuck where it is because of its age, but it's
doing just fine for managing my Photos library (I manage on the iMac,
and edit on the iPad), and works OK still as a home server for
HomeSharing my movies and music.

It can sit there doing that for as long as that all still works.

On another side note, even my old iPhone 6S is still working, being
connected to a Behringer UFO202 and my Technics turntable, so I can
airplay my LPs to the HomePods (it's alright actually, not as good as
the old NAD/Tannoy combo, but it's tidied the lounge up a lot, and
sounds fine to my ageing ears with a little tinnitus developing).

So yeah, don't be chucking out the older stuff if it still does a job
just fine.

--
Andy H

nospam

unread,
May 16, 2022, 1:18:40 PM5/16/22
to
In article <6tugK.100618$ep1....@fx03.ams1>, David Brooks
<D...@nomail.afraid.org> wrote:

> >> What can you do using same which I cannot/could not do on my current
> >> iMac running macOS Monterey?
> >
> > You couldn't run my 35mm slide scanner. I keep an old Mini kicking around
> > for
> > the purpose.
>
> Understood. Thanks for so advising.
>
> There might well be a modern 35mm slide scanner which WILL work with
> macOS Monterey.

it's very generous of you to find such a scanner and buy it for him,
along with all necessary software.

J. J. Lodder

unread,
May 18, 2022, 4:46:51 AM5/18/22
to
Just found another unexpected way to easily get at the package contents.
Right Click -> Open With -> BBEdit gives you a new BBEdit window
with the package contents in view.
You can drag them out. This copies, it doesn't displace,
so it leaves the package intact,

Jan

nospam

unread,
May 18, 2022, 5:28:04 AM5/18/22
to
In article <t62e2t$93o$1...@alanrichardbarker.eternal-september.org>, Alan
B <alanrich...@nospamgmail.com.here> wrote:

> > Just found another unexpected way to easily get at the package contents.
> > Right Click -> Open With -> BBEdit gives you a new BBEdit window
> > with the package contents in view.
> > You can drag them out. This copies, it doesn't displace,
> > so it leaves the package intact,
>
> Canšt get it to work with .app packages but then you can right click them
> to see inside anyway.

drag it to a new bbedit window, which also works for any folder.

J. J. Lodder

unread,
May 18, 2022, 5:57:19 AM5/18/22
to
nospam <nos...@nospam.invalid> wrote:

> In article <t62e2t$93o$1...@alanrichardbarker.eternal-september.org>, Alan
> B <alanrich...@nospamgmail.com.here> wrote:
>
> > > Just found another unexpected way to easily get at the package contents.
> > > Right Click -> Open With -> BBEdit gives you a new BBEdit window
> > > with the package contents in view.
> > > You can drag them out. This copies, it doesn't displace,
> > > so it leaves the package intact,
> >
> > Can't get it to work with .app packages but then you can right click them
> > to see inside anyway.
>
> drag it to a new bbedit window, which also works for any folder.

Drag to the desktop, or any other Finder window works for me,

Jan

Chris Ridd

unread,
May 18, 2022, 2:09:43 PM5/18/22
to
BBEdit is great for opening zip files, tarballs, and all sorts of other
files "containing" internal directory structures and other files.

--
Chris
0 new messages