Re: Access to Zip
Re: Access to Zip
- Subject: Re: Access to Zip
- From: kai <email@hidden>
- Date: Sat, 24 Jun 2006 03:35:17 +0100
On 24 Jun 2006, at 02:55, some young hopeful wrote:
this appears to fix the issue here:
I just noticed one or two other issues, so I'll leave at this for
tonight:
-----------
(* Caution: the last statement in the try block deletes the zip file
without trashing it *)
to unzip_and_delete(z)
try
set p to quoted form of z's POSIX path
set n to paragraph 2 of (do shell script "zipinfo " & p)
set n to n's text ((offset of ":" in n) + 4) thru -(1 + ((n ends
with "/") as integer))
set d to (do shell script "dirname " & p) & "/"
set f to d & n as POSIX file
tell application "Finder" to if f exists then error "The " & item
f's class & " \"" & n & "\" already exists."
do shell script "unzip -qo " & p & " -x __MACOSX/* -d " & quoted
form of d
do shell script "rm " & p (* delete the zip file without trashing *)
on error e
display dialog e buttons {"Cancel"} default button 1
end try
end unzip_and_delete
unzip_and_delete(choose file of type "com.pkware.zip-archive" without
invisibles)
-----------
(Don't know about Wimbledon - is this the solitaire season, by any
chance?)
G'night, folks.
---
kai
_______________________________________________
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