• 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: Selecting files of type zip
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selecting files of type zip


  • Subject: Re: Selecting files of type zip
  • From: Yvan KOENIG <email@hidden>
  • Date: Thu, 16 Apr 2009 13:41:40 +0200


Le 16 avr. 2009 à 13:20, Sutapalli Satyanarayana a écrit :

I am using the following statement to display a file choose dialog, where user is permitted to select only zip files. But "ZIP" is not a valid file type. Can some one tell me what is the valid type for ZIP files.

set theItems to POSIX path of (choose file with prompt "Select an zip file:" of type {"ZIP"} default location (path to desktop))

Or we can do another thing. Let user select any file. Once user selects from the apple script, can we check whether file is of type zip or not and throw error message accordingly.


(a) a file type is a FOUR characters string but you use a three characters one.

The correct string is "ZIP " (with a space.

(b) with macOs X, most of the time, files are not given a file type but an Universal Type Identifier (UTI).

for zip files, the UTI is:  "com.pkware.zip-archive" .

Yvan KOENIG (from FRANCE jeudi 16 avril 2009 13:41:28)


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Copy to list Question (From: Oakley Masten <email@hidden>)
 >Re: Copy to list Question (From: Alexis Gottlieb <email@hidden>)
 >Selecting files of type zip (From: "Sutapalli Satyanarayana" <email@hidden>)

  • Prev by Date: Selecting files of type zip
  • Next by Date: Re: Selecting files of type zip
  • Previous by thread: Selecting files of type zip
  • Next by thread: Re: Selecting files of type zip
  • Index(es):
    • Date
    • Thread