RE: delete first 3 characters in a file name
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