Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Count folders

 
   Mac (Home) -> Apple Scripts RSS
Next:  Using Applescript to Sleep Computer  
Author Message
Jo_y

External


Since: Jun 22, 2008
Posts: 27



(Msg. 1) Posted: Mon Nov 17, 2008 4:03 pm
Post subject: Count folders
Archived from groups: alt>comp>lang>applescript (more info?)

tell application "Finder"
set c to the selection as alias list
set h to count (items in c whose class is folder)

end tell

how should i formulate this script, to get the variable h?

c= 1 document file, 2 folders (in selection)
h= must return 2 (folders)
Back to top
Login to vote
Michelle Steiner

External


Since: Aug 30, 2005
Posts: 1352



(Msg. 2) Posted: Mon Nov 17, 2008 5:53 pm
Post subject: Re: Count folders [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
Jo_y

External


Since: Jun 22, 2008
Posts: 27



(Msg. 3) Posted: Tue Nov 18, 2008 5:45 pm
Post subject: Re: Count folders [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hey, Michelle.

all what i wanted and i want to do is to clean up and to shorten a bit
my old scripts, (i use mostly repeat-routines) but it seems that the
way is not always practicable. So, thanks anyway for the solution.
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Applescript to count certain things in a mail folder. - I was turned into Applescript a bit ago for another mail related task. I've tinkered a bit but my skills are really weak and I'm hung up on this simple todo I need... I have a folder full of old old messages that were form page submissions. I want to..

Folder Actions and child folders - I've been playing around with Folder Actions (very cool!), wondering if it's possible to get a Folder Action to trigger when a *child folder* is changed. i.e. attach the action to ParentFolder, then trigger when a file is added to ChildFolder or..

OS/X Tiger loses files/folders? - I have an AppleScript that I developed on OS/X Panther (10.3.9). It traverses a folder structure and renames any folders or files that have troublesome characters in their names, or whose names are too long. (These folders and files have to be moved via....

scripting Quicktime to convert images to jpg - Here is a droplet that I am working on to have Quicktime translate still images generated by iMovie into JPG images that can be imported into iPhoto. on open (theList) tell application "Finder" repeat with x in theList if {"disk&quo...

Help with script, please - Here is the script: tell application "Mail" set foo to the selection set foo to item 1 of foo set address_ to address of item 1 of to recipient of foo if not (name of item 1 of to recipient of foo exists) then set AppleScript...
       Mac (Home) -> Apple Scripts All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact