how to make a Finder Service using Automator and an Applescript
how to make a Finder Service using Automator and an Applescript
- Subject: how to make a Finder Service using Automator and an Applescript
- From: Alastair Leith <email@hidden>
- Date: Tue, 10 Oct 2017 10:20:05 +0800
I want to be able to select a file in Finder and have a Finder Service
available to take the filename text and replace all the whitespace breaks
between alphanumeric characters with hyphens.
e.g. So "3.7 Enteric fermentation emissions.pdf” becomes
“3.7-Enteric-fermentation-emissions.pdf"
So when I generate a Dropbox link it becomes
"https://www.dropbox.com/s/pe8enatl6g3nrbq/3.7-Enteric-fermentation-emissions.pdf?dl=0
<https://www.dropbox.com/s/pe8enatl6g3nrbq/3.7-Enteric-fermentation-emissions.pdf?dl=0>”
rather than
"https://www.dropbox.com/s/pe8enatl6g3nrbq/3.7 Enteric fermentation emissions copy.pdf?dl=0
<https://www.dropbox.com/s/pe8enatl6g3nrbq/3.7 Enteric fermentation emissions copy.pdf?dl=0>"
In grep i’d simply search for all “\s+” and replace with “-“. Do I need to
write an Applescript (or Grep shell script) and then run it from automator?
I know it’s a remedial question but any help to get me started will be
gratefully received.
Alastair Leith
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden