• 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: Martin Orpen <email@hidden>
  • Date: Wed, 11 Oct 2006 23:26:04 +0100

On 11 Oct 2006, at 20:18, kai wrote:

However, BOMArchiveHelper does seem to be intended more as an aid for manual archiving (in spite of lacking a GUI). In terms of scripting, I'd probably go for ditto, too.

I'm not able to look up the references as to when and whom, but somebody posted this FA script here some time ago and it has always performed well every time I've needed to use it:



-- this folder action was posted to AS-users -- original author unknown, but works very well in Panther

on adding folder items to this_folder after receiving these_items
tell application "Finder"
if not (exists folder "Done" of this_folder) then
make new folder at this_folder with properties {name:"Done"}
end if
set the destination_folder to folder "Done" of this_folder as alias
set the destination_directory to POSIX path of the destination_folder
end tell
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
set the item_info to info for this_item
if this_item is not the destination_folder and the name extension of the item_info is not in {"zip", "sit"} then
set the item_path to the quoted form of the POSIX path of this_item
set the destination_path to the quoted form of (destination_directory & (name of the item_info) & ".zip")
do shell script ("/usr/bin/ditto -c -k -rsrc --keepParent " & item_path & " " & destination_path)
end if
end repeat
end adding folder items to




--
Martin Orpen
_______________________________________________
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


References: 
 >scripting BOMArchiveHelper possible ? (From: "Trudel, Gaetan" <email@hidden>)
 >Re: scripting BOMArchiveHelper possible ? (From: Axel Luttgens <email@hidden>)
 >Re: scripting BOMArchiveHelper possible ? (From: Martin Orpen <email@hidden>)
 >Re: scripting BOMArchiveHelper possible ? (From: kai <email@hidden>)

  • Prev by Date: Re: triggering a script in Filemaker
  • Next by Date: [ann] Ruby appscript 0.1.1 released
  • Previous by thread: Re: scripting BOMArchiveHelper possible ?
  • Next by thread: Re: scripting BOMArchiveHelper possible ?
  • Index(es):
    • Date
    • Thread