• 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: delete first 3 characters in a file name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: delete first 3 characters in a file name


  • Subject: RE: delete first 3 characters in a file name
  • From: "Jan-Bultereys" <email@hidden>
  • Date: Fri, 10 Dec 2004 11:53:32 +0100
  • Thread-topic: delete first 3 characters in a file name

thank you all for you input....
especially, michelle,kai,bill,andrew,emmanuel.....

This is what I finally have and working...:

tell application "Finder"
	activate
	set theFiles1 to folder "to/the/path1"
	repeat with i from 1 to count theFiles1
		set oldName to name of item i of theFiles1
		set newName to characters 5 thru -1 of oldName as string
		set name of item i of theFiles1 to newName
	end repeat
end tell


best regards and have a nice weekend,
jan
> ----------
> From: 	applescript-users-bounces+jan.bultereys=email@hidden on behalf of Michelle Steiner
> Sent: 	Thursday, December 9, 2004 23:54 PM
> To: 	kai
> Cc: 	email@hidden
> Subject: 	Re: delete first 3 characters in a file name
>
> On Dec 9, 2004, at 3:44 PM, kai wrote:
>
> >> When it is supposed to change item 2, it changes item 3, so when it
> >> tries to change item 3, it errors because the name doesn't have the
> >> underscore.
> >
> > The sequence of files can change as filenames are changed:
>
> I see.  In this case, then, it probably would have been better to use
> the "repeat with a in b" syntax.
>
> -- Michelle
>
> --
> Don't anthropomorphize computers.  They hate that.
>
>  _______________________________________________
> 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
>
>
 _______________________________________________
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: [OT] Re: Smile and FruitMenu
  • Next by Date: Re: Scripting Wireless Connectivity
  • Previous by thread: Re: delete first 3 characters in a file name
  • Next by thread: Re: delete first 3 characters in a file name
  • Index(es):
    • Date
    • Thread