• 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
Folder or File?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Folder or File?


  • Subject: Folder or File?
  • From: Gil Dawson <email@hidden>
  • Date: Thu, 23 Jun 2011 15:16:43 -0700

How can my program tell whether a dropped item is a folder or a file?

on open FolderList --expecting two folders 
try
if class of FolderList is not list then ¬
error "Class of FolderList is " & ¬
class of FolderList & "."


if length of FolderList is not two then ¬
error "Length of FolderList is " & ¬
length of FolderList & "."


set FolderA to item 1 of FolderList
set FolderB to item 2 of FolderList


error "class of FolderA=" & class of FolderA


--> Gets <<class bmrk>> for either folders or files


CompareFolders(FolderA, FolderB)


on error errmsg number errn
display dialog "Error1: " & errmsg & " (" & errn & ")" 
end try
end open

 _______________________________________________
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

  • Follow-Ups:
    • Re: Folder or File?
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: width of column id name column
  • Next by Date: Re: Folder or File?
  • Previous by thread: Re: tell block question
  • Next by thread: Re: Folder or File?
  • Index(es):
    • Date
    • Thread