• 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: error -1700
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error -1700


  • Subject: Re: error -1700
  • From: Robert Poland <email@hidden>
  • Date: Sun, 11 Nov 2012 12:11:21 -0700

Thanks again Yvan,

I'll have to look into a script that I use that successfully uses the "kind" to detect folders.

From your info I found "class" and that seems to detect "Folder" well enough for my purposes.

FYI;

I have a script that changes file names by the batch, change "A" to "B", etc.

I'm working on a new script that will do the same for entire folders.


On Nov 11, 2012, at 11:43 AM, "koenig.yvan" <email@hidden> wrote:

>
> Le 11/11/2012 à 19:04, Robert Poland <email@hidden> a écrit :
>
>> All,
>>
>> My current battle is to get the "kind" :
>> 	tell application "System Events"
>> ...
>> 	set this_info to name of disk item the_item
>> 	set theKind to kind of disk item the_item
>> …
>>
>> Gets the "name" but "kind" errors with folders.
>>
>
> Perfectly logical.
>
> There is no kind property for folders
>
> What are you trying to achieve ?
> Maybe this piece of code may help.
>
> (path to desktop as text) & "Default.lproj:"
>
> tell application "System Events"
> 	try
> 		kind of (get properties of disk item result)
> 		(* {
> name extension:"lproj",
> volume:"Macintosh HD",
> creation date:date "samedi 17 mars 2012 10:27:52",
> class:folder,
> modification date:date "samedi 17 mars 2012 10:27:52",
> physical size:missing value,
> URL:"file://localhost/Users/…",
> path:"Macintosh HD:Users:…",
> displayed name:"Default.lproj",
> POSIX path:"/Users/…",
> visible:true,
> id:"Default.lproj,-100,88830",
> size:missing value,
> busy status:false,
> container:folder "Macintosh HD:Users:…" of application "System Events",
> package folder:false,
> name:"Default.lproj"}
> 	*)
> 	on error
> 		"folder"
> 	end try
> 	set theKind to result
> 	log theKind
> 	(*folder*)
> end tell
>
> (path to desktop as text) & "GlobalCSCA110111.pdf"
>
> tell application "System Events"
> 	try
> 		kind of (get properties of disk item result)
> 		(* {
> short version:"",
> container:folder "Macintosh HD:Users:…" of application "System Events",
> path:"Macintosh HD:Users:…:GlobalCSCA110111.pdf",
> file type:missing value,
> volume:"Macintosh HD",
> physical size:16384,
> URL:"file://localhost/Users/…/GlobalCSCA110111.pdf",
> id:"GlobalCSCA110111.pdf,-100,4552795",
> displayed name:"GlobalCSCA110111.pdf",
> busy status:false,
> kind:"Portable Document Format (PDF)",
> creator type:missing value,
> version:"",
> name extension:"pdf",
> POSIX path:"/Users/…/GlobalCSCA110111.pdf",
> name:"GlobalCSCA110111.pdf",
> modification date:date "mercredi 31 octobre 2012 20:35:21",
> size:16384,
> class:file,
> type identifier:"com.adobe.pdf",
> package folder:false,
> stationery:false,
> creation date:date "mercredi 31 octobre 2012 20:35:21",
> default application:alias "Macintosh HD:Applications:Preview.app:" of application "System Events",
> visible:true,
> product version:""} *)
> 	on error
> 		"folder"
> 	end try
> 	set theKind to result
> 	log theKind
> 	(*Portable Document Format (PDF)*)
> end tell
>
> Yvan KOENIG (VALLAURIS, France) dimanche 11 novembre 2012 19:42:51

Robert Poland - Fort Collins, CO




 _______________________________________________
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: 
 >error -1700 (From: Robert Poland <email@hidden>)
 >Re: error -1700 (From: "koenig.yvan" <email@hidden>)
 >Re: error -1700 (From: Robert Poland <email@hidden>)
 >Re: error -1700 (From: "koenig.yvan" <email@hidden>)
 >Re: error -1700 (From: Robert Poland <email@hidden>)
 >Re: error -1700 (From: John <email@hidden>)
 >Re: error -1700 (From: Robert Poland <email@hidden>)
 >Re: error -1700 (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: error -1700
  • Next by Date: Re: error -1700
  • Previous by thread: Re: error -1700
  • Next by thread: Re: error -1700
  • Index(es):
    • Date
    • Thread