Re: Automator-users Digest, Vol 124, Issue 8
Re: Automator-users Digest, Vol 124, Issue 8
- Subject: Re: Automator-users Digest, Vol 124, Issue 8
- From: Christian Boyce <email@hidden>
- Date: Mon, 18 Sep 2017 09:47:38 -0700
You can put a run AppleScript step into your Automator workflow, like this:
on run {input, parameters}
set the_path to input as string
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
set the_folder_name to text item -2 of the_path
set AppleScript's text item delimiters to oldDelims
return the_folder_name
end run
> On Sep 17, 2017, at 9:52 PM, email@hidden
> <mailto:email@hidden> wrote:
>
>
> Message: 1
> Date: Mon, 18 Sep 2017 14:49:15 +1000
> From: Terry Wedd <email@hidden
> <mailto:email@hidden>>
> To: email@hidden <mailto:email@hidden>
> Subject: Getting folder name from selected folder
> Message-ID: <email@hidden
> <email@hidden">mailto:email@hidden>>
> Content-Type: text/plain; charset="utf-8"
>
> Hi and thanks in advance,
>
> I have to constantly move a subfolder with a static name of image files from
> a parent folder with a job specific title.
>
> I have a workflow consisting of the following steps:
>
> Get Selected Finder Items
> Move Finder Items (static location)
> Get Folder Contents
> Filter Finder Items (for Static subfolder)
> Copy Finder Items (to a Dropbox folder)
> Rename Finder Items: Name Single Item
> New Mail Message (with a pause)
>
> This works without any problems but I want to automate the rename. I have
> tried inserting Get Value of Variable with the Variable set to Folder Name
> but end up with a Path.
>
> Is there a simple way to get the folder name? I have tried to use a script
> using keyboard commands (enter/Select All/Copy) but end up with the folder
> and not the text.
>
> Any help greatly appreciated.
>
> Kind Regards,
>
> Terry Wedd
>
> Production Manager
>
> P 03 9045 9915 | M 0434 552 259| W www.arcstudio.com.au
> <http://www.arcstudio.com.au/> <http://www.arcstudio.com.au/
> <http://www.arcstudio.com.au/>>
> 19 Queens Avenue, Hawthorn 3122
I hope that helps.
c
--
Christian Boyce
Christian Boyce and Associates
Mac, iPhone, and iPad Consultants
For appointments, please call the office: 424-354-3548.
We do not make appointments by email or text.
New on our blog: Hear me on the Digital Village radio program discussing
Apple's new iPhones <http://christianboyce.com/on-the-radio-september-2017/>
Follow us on Twitter! http://twitter.com/christianboyce
<http://twitter.com/christianboyce>
Be a fan on Facebook! https://www.facebook.com/christianboyce.and.associates
<https://www.facebook.com/christianboyce.and.associates>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden