Re: Difference in running Apple's "Add to File Names" on Panther/Tiger
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