• 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
Re: Finding and replacing multiple characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding and replacing multiple characters


  • Subject: Re: Finding and replacing multiple characters
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 9 Jul 2003 02:36:04 -0500

At 07/08/2003 19:04 -0400, Yannick Brodeur wrought:

I need a script that would edit the names of files and folders in a
chosen directory. The following characters / \ : * ? " < > needs to be
replaced by an underscore.
______________________________________________________________________

Greetings,

Unless you have a real need for vanilla AppleScript regular expressions are the way to go.

Using the Satimage osax on Mac OS X:

set txt to "/\\:*?\"<>"

set newtext to change "[/\\:*?\"<>]" into "_" in txt with regexp

--> ________

http://satimage-software.com/en/


Best Regards,

Christopher Stone
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Finding and replacing multiple characters (From: Yannick Brodeur <email@hidden>)

  • Prev by Date: Revolution buys MetaCard
  • Next by Date: Script Editor 2.0 Services problem
  • Previous by thread: Re: Finding and replacing multiple characters
  • Next by thread: Re: applescript url
  • Index(es):
    • Date
    • Thread