• 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
Rename File Script newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rename File Script newbie question


  • Subject: Rename File Script newbie question
  • From: Phil Holden <email@hidden>
  • Date: Thu, 6 Mar 2003 17:20:06 +0000

Hi,

I wonder if someone here could help me with a little problem.

I'm using the following script as a script step in a FMPro export script in order to rename html files using calculated filenames.

tell application "Finder"
activate
move item"myfile" of folder "myfolder" to trash
set name of item "exportfilename" of folder "myfolder" to "newfilename"
end tell

This works OK but as I am testing my application the trash gets more and more full. I know that I could empty the trash from my script but I prefer not to do this.

Is there some way for me to rename a file to another name and if this name already exists for this file to be overwritten. I have read about using replacing boolean but can't seem to get this to work in this script. I think that I need guidance on the exact syntax for use of replacing.

I'm working in OS 10.2.4 but would like the script to work in OS9 and previous.

Any help would be very much appreciated.

Best wishes

Phil Holden
_______________________________________________
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.

  • Follow-Ups:
    • Re: Rename File Script newbie question
      • From: John Delacour <email@hidden>
    • Re: Rename File Script newbie question
      • From: John Delacour <email@hidden>
    • Re: Rename File Script newbie question
      • From: Emmanuel <email@hidden>
  • Prev by Date: Save as application screws up?
  • Next by Date: Re: [OT] FileMaker Pro scripting
  • Previous by thread: Re: Save as application screws up?
  • Next by thread: Re: Rename File Script newbie question
  • Index(es):
    • Date
    • Thread