Re: renaming files in Finder
Re: renaming files in Finder
- Subject: Re: renaming files in Finder
- From: Stephen Swift <email@hidden>
- Date: Mon, 04 Feb 2002 16:32:14 -0500
- Method-key: Ydco m.ooai. jrm.o uprm yd. e.ot ru Oy.ld.b Xgpbdam O,cuyv
At 2/4/02 11:06 AM, William Porter (email@hidden) Wrote:
>
on run
>
set myFolder to choose folder
>
addprefix(item 1 of myFolder as alias)
>
end run
>
>
on addprefix(myFolder)
>
tell application "Finder"
>
repeat with x in every file of myFolder
>
set name of x to ("temp " & name of x)
>
end repeat
>
end tell
>
end addprefix
Why would you need the subroutine in the first place?
Wouldn't this be a much easier approach?
on run
set myFolder to choose folder
--asks you what folder
tell application "Finder"
repeat with x in every file of myFolder
set name of x to ("temp " & name of x)
end repeat
--adds "temp" to all file names in myFolder
end tell
end run
Stephen Swift
email@hidden
-----------------------------------------------
AppleScript Guru - The Mac Observer
http://www.macobserver.com/tips/applescript