• 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: Check to see if folder contains items?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check to see if folder contains items?


  • Subject: Re: Check to see if folder contains items?
  • From: wayne melrose <email@hidden>
  • Date: Thu, 14 Apr 2005 19:26:20 +0200

Hope this helps..

tell application "Finder"
set myfolder to choose folder
set foldercount to count folders of folder myfolder
set filecount to count files of folder myfolder
if foldercount > 0 then
-- move folders
end if
if filecount > 0 then
-- move files
end if
end tell

Another useful line of code is

move every file of entire contents of folder myfolder

Wayne Melrose






On Apr 14, 2005, at 7:14 PM, Neil Lee wrote:

This is a total newbie question, but I haven't been able to figure out or Google my way to a solution.

I want to check to see if a particular folder contains items, and if so, move those items to a different location. I've got the move working, but I can't seem to figure out how to check if the folder actually has anything in it.

Any assistance will be showered with gratitude and heart-felt ego-stroking.

Neil
--
Slumming at the beatnikPad : http://www.beatnikpad.com/
The person you love is 72.8% water.

_______________________________________________
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
 _______________________________________________
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

References: 
 >Check to see if folder contains items? (From: Neil Lee <email@hidden>)

  • Prev by Date: Re: Check to see if folder contains items?
  • Next by Date: Re: Display Dialog
  • Previous by thread: Re: Check to see if folder contains items?
  • Next by thread: iTunes: database ID equivalent for playlists?
  • Index(es):
    • Date
    • Thread