Re: Renaming files in Finder: why so slow?
Re: Renaming files in Finder: why so slow?
- Subject: Re: Renaming files in Finder: why so slow?
- From: Michelle Steiner <email@hidden>
- Date: Sat, 30 Aug 2003 15:24:52 -0700
On Saturday, August 30, 2003, at 03:33 PM, Bob.Kalbaugh wrote:
on doUnderScore(theList)
tell application "Finder"
activate
Not needed, I think, but I don't think it would hurt.
set oldTIDs to AppleScript's text item delimiters
move above line before the tell loop
repeat with thisFile in theList
set AppleScript's text item delimiters to {" "}
set oldName to text items of (get the name of thisFile)
set AppleScript's text item delimiters to {"_"}
set newName to (oldName as string)
set AppleScript's text item delimiters to {" "}
The above line is not needed; it replicates the identical line at the
beginning of the repeat loop.
set name of thisFile to newName
end repeat
set fContents to (every item of theList)
setfContents to (every folder of thelist)
repeat with anItem in fContents
if kind of anItem is "Folder" then
Delete the above line
my doUnderScore(anItem)
end if
Delete the above line
end repeat
set AppleScript's text item delimiters to oldTIDs
Move above line after tell loop.
end tell
end doUnderScore
I don't know how much of a speed improvement, if any, this will bring,
but it should help somewhat.
--Michelle
--
There's no place like 127.0.0.1
There's no place like 127.0.0.1
There's no place like 127.0.0.1
_______________________________________________
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.