• 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: Paul Skinner <email@hidden>
  • Date: Sat, 20 Dec 2003 11:03:59 -0500

On Dec 19, 2003, at 9:43 AM, Buttery, Ian wrote:

Hi,

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

H001H44 to h001h44
...

Ian Buttery

How's this?

set f to choose folder
tell application "Finder"
set fileList to every file of f
repeat with thisFile in fileList
set fileName to the name of thisFile
set lowercaseName to my changeCase(fileName)
considering case
if fileName is not equal to lowercaseName then
set the name of thisFile to lowercaseName
end if
end considering
end repeat
end tell

on changeCase(fileName)
do shell script "echo '" & fileName & "' | tr '[:upper:]' '[:lower:]'"
end changeCase

PS
_______________________________________________
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: Make new folder with icon from image?
  • Next by Date: Re: Sorting IP addresses
  • Previous by thread: Re: change from upper to lower case
  • Next by thread: Free or cheap calendar and clock controls for Studio?
  • Index(es):
    • Date
    • Thread