Re: change from upper to lower case
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.