• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
how to make a Finder Service using Automator and an Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: how to make a Finder Service using Automator and an Applescript
      • From: Bob Stern <email@hidden>
    • Re: how to make a Finder Service using Automator and an Applescript
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Applescript code for converting an InDesign CC2017 document from one color space to another
  • Next by Date: Re: how to make a Finder Service using Automator and an Applescript
  • Previous by thread: Re: Applescript code for converting an InDesign CC2017 document from one color space to another
  • Next by thread: Re: how to make a Finder Service using Automator and an Applescript
  • Index(es):
    • Date
    • Thread