Friday, November 17, 2017
  • Index
  •  » Automator
  •  » Make new folder with item's creation date as default name

#1 2015-03-03 02:28:51 pm

1theo0
Member
Registered: 2012-12-19
Posts: 6

Make new folder with item's creation date as default name

Hello! I'm trying to create an Automator service that receives multiple files in Finder and creates a folder from them, but writes in the naming dialogue by default the first item's creation date.
How can I define "input" as the first item of the selection?

What am I missing here?

service receives files or folders in Finder
get folder contents
run AppleScript

Applescript:


tell application "Finder"
   set theFileDate to (creation date of input as string)
   make new folder at window 1 with properties {name:text returned of (display dialog "Choose a name" default answer theFileDate)}
   move selection to the result
end tell

Offline

 
  • Index
  •  » Automator
  •  » Make new folder with item's creation date as default name

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)