• 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: renaming files in Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • More problems with File extensions & Displayed names
      • From: Mr Tea <email@hidden>
    • Re: renaming files in Finder
      • From: Mr Tea <email@hidden>
  • Prev by Date: Re: Palm Desktop: how to make a datebook entry or todo?
  • Next by Date: Shutdown Script In X
  • Previous by thread: is Software Update scriptable under OSX?
  • Next by thread: Re: renaming files in Finder
  • Index(es):
    • Date
    • Thread