• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: scripting BOMArchiveHelper possible ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting BOMArchiveHelper possible ?


  • Subject: Re: scripting BOMArchiveHelper possible ?
  • From: Axel Luttgens <email@hidden>
  • Date: Wed, 11 Oct 2006 14:49:59 +0200

On 5/10/06 22:51, Trudel, Gaetan wrote:

Hello,

I would like to know if BOMArchiveHelper on Mac OS 10.4.8 is scriptable.

I think I could script the UI to zip or unzip files or folders but i would
prefer to control the app directly.

The app seems to be hidden in the OS and I can't see or add it into the
Library list in Script Editor.

The app is located into:
/System/Library/CoreServices
But it doesn't seem have a dictionary (nor to be scriptable), so no wonder if you can't add it to the Library list...


Now, it seems its executable may be invoked from a shell script, allowing some kind of limited scriptability from within AppleScript (through a "do shell script" command).
Some experiments from within Terminal.app, such as:


# cd to the executable's directory
cd /System/Library/CoreServices/BOMArchiveHelper.app/Contents/MacOS
# compress file "testfile" on my Desktop
# this creates file "testfile.cpgz" on my Desktop
./BOMArchiveHelper ~/Desktop/testfile
# uncompress the just created file
# this creates file "testfile 2" on my Desktop
./BOMArchiveHelper ~/Desktop/testfile.cpgz
tend to show that:


   - compressed or uncompressed file is created in the same directory
     as the orginal file
   - the executable takes care for possible name conflicts
   - the decision to compress or decompress a file seems to rely on an
     inspection of the file's contents (very likely with the help of
     the "file" command), not just on the file's extension
   - various formats for compressed files seem to be handled

But I couldn't manage to force a compression format other than "cpgz".
(someone? ;-) )

An OSAX or script addition ?


There are so many options already available through commands (and thus through "do shell script") that an addition might just prove redundant.
For example, you could have a look at the man pages for "ditto", "gzip" and "tar" and pick up the one best suited for your needs.
Moreover, under 10.4+, those commands handle (almost perfectly, unless your files have ACLs) the metadata associated to files and folders, such as Finder comments or labels.


HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: scripting BOMArchiveHelper possible ?
      • From: Philip Aker <email@hidden>
    • Re: scripting BOMArchiveHelper possible ?
      • From: Martin Orpen <email@hidden>
References: 
 >scripting BOMArchiveHelper possible ? (From: "Trudel, Gaetan" <email@hidden>)

  • Prev by Date: Re: duplicate
  • Next by Date: Re: scripting BOMArchiveHelper possible ?
  • Previous by thread: scripting BOMArchiveHelper possible ?
  • Next by thread: Re: scripting BOMArchiveHelper possible ?
  • Index(es):
    • Date
    • Thread