Re: change from upper to lower case
Re: change from upper to lower case
- Subject: Re: change from upper to lower case
- From: Michael Schmidt <email@hidden>
- Date: Fri, 19 Dec 2003 17:26:10 +0100
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
C251C56 to c251c56
etc., etc.,
Hi!
First shot, works with 7-bit-ASCII-Names:
on run
set lowercaseFolder to (choose folder with prompt "Select the folder
to lowercase files")
if lowercaseFolder - "" then
tell application "Finder"
set filesToRename to every file in folder lowercaseFolder
repeat with aFile in filesToRename
set name of aFile to my lowercase(name of aFile)
end repeat
end tell
end if
end run
on lowercase(aText)
set retourStr to ""
repeat with aChar in text items of aText
set thisAsciiNo to ASCII number of aChar
if thisAsciiNo is less than 91 and thisAsciiNo is greater than 64 then
set retourStr to retourStr & (ASCII character (thisAsciiNo + 32))
else
set retourStr to retourStr & aChar
end if
end repeat
return retourStr
end lowercase
Greetings from Hamburg and merry christmas!
Michael Schmidt
_______________________________________________
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.