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

Re: Rename File Script newbie question


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

Emmanuel recently said,

>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 hope there's a better solution, but you could proceed in 3 steps:

1. Move the file out of the folder into a safe place (an empty folder
would be perfect, or you can use your Temporary Items folder)
2. Rename the file
3. Move it back to the folder, using Finder's "move ... with replacing".

Hi Emmanuel,

Thanks for taking the time to reply.

Your idea gives me another one. Perhaps if I use your suggestion with a twist I can just move files once with each export.

If I have a backup folder I can move out all of the existing files to that folder (perhaps) adding a .bac suffix and replace any existing files with the same name. Having emptied my export folder I can now export new files into here safe in the knowledge that any files with conflicting names will have already been moved out.

I'll give it a go and let you know how I get on.

Thanks again.

Phil
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Philip Holden Tel: 01765650079 Fax: 01765 650081

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
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.

  • Prev by Date: Re: AppleScript object (Re: text item delimiters question)
  • Next by Date: Re: Command to exit script immediately?
  • Previous by thread: Re: Rename File Script newbie question
  • Next by thread: Re: Rename File Script newbie question
  • Index(es):
    • Date
    • Thread