Home » Questions » Computers [ Ask a new question ]

Can Automator or Applescript copy the number of items in a folder to the clipboard?

Can Automator or Applescript copy the number of items in a folder to the clipboard?

In Automator or Applescript, is there a way to get the number items in a folder and save result to the Clipboard or Automator Variable so I can use it in the next Action?

Asked by: Guest | Views: 296
Total answers/comments: 1
Guest [Entry]

"In just Applescript:

-- set fold to choose folder
tell app ""Finder""
set sel to selection
set fold to item 1 of sel
set n to count fold -- count items of entire contents of fold
end tell
-- set the clipboard to n as text
-- display dialog n"