• 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
How to differentiate a Folder from a Package
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to differentiate a Folder from a Package


  • Subject: How to differentiate a Folder from a Package
  • From: "Manfred M. Strasser" <email@hidden>
  • Date: Mon, 21 Feb 2005 14:15:58 +0100

Is anybody knowing a easy (a quick) way to make a different between a Folder or a Package?
I think my way isn't the best way ...


----
property myFileList : ""

on open theFileList
	repeat with theFile in theFileList
		File_or_Folder(theFile)
	end repeat
end open

on File_or_Folder(theFile)
if (theFile as text) ends with ":" and (theFile as text) does not end with ".app:" then
tell application "Finder"
set FolderList to every item of theFile
end tell
repeat with theFolder in FolderList
set theFolder to theFolder as alias
my File_or_Folder(theFolder)
end repeat
else
ProcessIt(theFile)
end if
end File_or_Folder


on ProcessIt(theFile)
	tell application "Finder"
		if myFileList = "" then
			set myFileList to theFile
		else
			set myFileList to myFileList & return & theFile as text
		end if
	end tell
end ProcessIt
---

_______________________________________________
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


  • Follow-Ups:
    • Re: How to differentiate a Folder from a Package
      • From: Emmanuel <email@hidden>
    • Re: How to differentiate a Folder from a Package
      • From: jj <email@hidden>
  • Prev by Date: Re: RegExps in AS
  • Next by Date: Re: RegExps in AS
  • Previous by thread: Re: RegExps in AS
  • Next by thread: Re: How to differentiate a Folder from a Package
  • Index(es):
    • Date
    • Thread