• 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: change from upper to lower case
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change from upper to lower case


  • Subject: Re: change from upper to lower case
  • From: Mr Tea <email@hidden>
  • Date: Fri, 19 Dec 2003 20:33:19 +0000

On 19 Dec 2003, at 2.43 pm, Buttery, Ian wrote:

Does anyone know of a script to change a folder of 400 files from upper case to lower case, for example

There's one provided with OS X, called 'Change Case of Item Names', and it works on the contents of the front Finder window. It's in the 'Scripts' folder in the main Library folder (look in the 'Finder Scripts' subdirectory). If you have installed Script Menu, you can run it from there, or you can open the file and run it from a script editor. Works fine as long as item names don't contain accented letters (see my other recent post: 'Accented Characters in Finder Names').

I've revised the script, trimming down unwieldy variable names and over-verbose syntax, adding a raft of accented characters, and performing the string coercion required. I'll send it to you offlist if you want - it'll just get scrambled if I post it here.

It's not necessarily an example of good scripting practice, even though it's based on an 'Apple-certified' script. The case-changing routine relies heavily on the 'offset of' command, which more experienced scripters than I have suggested is not overly efficient or sophisticated.

I just tried the script on a folder with 136 items in it, mostly URL files, some with long, complex names containing slashes and allsorts. Took about 10 seconds, which is not wonderful, but not unfeasible if you don't need to do this sort of thing every five minutes.


HTH


Nick
pp Mr Tea
_______________________________________________
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.

  • Prev by Date: Re: change from upper to lower case
  • Next by Date: Re: auto run a applescript and quitting it
  • Previous by thread: Re: change from upper to lower case
  • Next by thread: Re: change from upper to lower case
  • Index(es):
    • Date
    • Thread