• 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: Difference in running Apple's "Add to File Names" on Panther/Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Difference in running Apple's "Add to File Names" on Panther/Tiger


  • Subject: Re: Difference in running Apple's "Add to File Names" on Panther/Tiger
  • From: "Nigel Garvey" <email@hidden>
  • Date: Fri, 24 Mar 2006 00:50:14 +0000

David Wolfe wrote on Thu, 23 Mar 2006 11:14:43 -0500:

>On Panther Macs, Apple's stock Finder script "Add to File Names.scpt"
>works normally. On Tiger Macs, it works normally except that if I try
>to add a zero to the beginning of filenames that begin with numbers
>(ex., to pad 3-digit numbers with a leading 0), I get an error
>message telling me that file(s) already exist with that/those names.

Tiger's Finder has a couple of bugs with regard to leading zeros on file
and folder names. You seem to have discovered another one.

As a quick fix, you could take the responsibility for seeing if the new
name already exists away from the Finder by changing this:

>on set_item_name(this_item, new_item_name)
>	tell application "Finder"
>		--activate
>		set the parent_container_path to (the container of this_item) as text
>		if not (exists item (the parent_container_path & new_item_name)) then

... to this:

  on set_item_name(this_item, new_item_name)
    	tell application "Finder"
		     set the parent_container to (the container of this_item) as alias
       if ((list folder parent_container without invisibles) does not
contain new_item_name) then


NG

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Return or No Return
  • Next by Date: Re: Return or No Return
  • Previous by thread: Difference in running Apple's "Add to File Names" on Panther/Tiger
  • Next by thread: Donald M Rossi/US/DNY is out of the office.
  • Index(es):
    • Date
    • Thread