• 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: Question about zipping files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about zipping files


  • Subject: Re: Question about zipping files
  • From: Gideon King <email@hidden>
  • Date: Mon, 15 Feb 2010 16:50:57 +1000

Thanks for the suggestion. Have not encountered Scripting Bridge before and have very little experience or understanding of AppleScript and no knowledge of Apple Events or what they do. I had a vague notion that Apple Events were pretty much old technology from before OSX, but now I see that it appears that it's the foundation of AppleScript. I guess I should take time to look into these technologies sometime (I come from a NextStep/OpenStep/WebObjects background)...

Is there any particular reason you say to stay away from NSTask?

Scripting Bridge seems like an interesting option, but after having generated the headers for Finder, I could not see a command there for compressing files. I guess it's not scriptable.

Jens has confirmed that there is no limit to the length of the args for NSTask, so am planning to go with my option 1 - it's a technology I understand, and should apparently do what I need to do, and do it efficiently.

On 15/02/2010, at 4:06 PM, Sean McBride wrote:

> Gideon King (email@hidden) on 2010-02-15 00:28 said:
>
>> Hi, I have a need to zip a selection of files from a folder.
>>
>> ...
>>
>> Are there any other options that I'm not aware of?
>
> NSWorkspaceCompressOperation?  Sounds promising, right?  But the docs
> say "This operation always returns an error"?  HA! :)
>
> Did you investigate Scripting Bridge, AppleScript, or Apple Events?  The
> Finder has a Compress option in its File menu, maybe you can tell Finder
> to zip for you.  Stay away from NSTask when you can.
>
> Sean
>
> --
> "Patriotism is supporting your country all the time, and your government
> when it deserves it." - Mark Twain
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Question about zipping files
      • From: "Sean McBride" <email@hidden>
References: 
 >Question about zipping files (From: Gideon King <email@hidden>)
 >Re: Question about zipping files (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Executing shell script with root privilege
  • Next by Date: Re: Question about zipping files
  • Previous by thread: Re: Question about zipping files
  • Next by thread: Re: Question about zipping files
  • Index(es):
    • Date
    • Thread