Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > apple script for renaming file by date.

apple script for renaming file by date.
Thread Tools
linuxgirl
Guest
Status:
Reply With Quote
Apr 20, 2000, 12:41 PM
 
Can I use an applescript to change the names of multiple files in a folder? I have alot of sequential image files(by date) that I need to number sequentially so that I can create a frame stack with them. Is this something that I can acheive with applescript? Or is there anothr program I can use to do this?
thanks
     
Dedicated MacNNer
Join Date: Nov 1999
Location: Georgetown, Demerara, Guyana
Status: Offline
Reply With Quote
Apr 20, 2000, 11:15 PM
 
Hi linuxgirl,

The short answers are "Yes" (& "Yes") and "Yes". :-)

For the AppleScript approach, you could use the Finder's 'sort' command to obtain a list of file references sorted by creation date or modification date in descending order. Then, once you have that pre-sorted list, you could use a standard 'repeat' loop to go through the list sequentially, incrementing a counter variable and renaming each file in turn. [For details, see the official "AppleScript Finder Guide" and "Applescript Language Guide", available via Apple's own AppleScript for Scripters web page dedicated to non-developer scripters. There you'll find links to the definitive online AppleScript reference manuals, all of which contain several useful examples and are also downloadable in PDF format. (Note: in the online frame-based "Applescript Language Guide", you may have to scroll all the way down the left pane to the 'Other Links' section before you can see the 'Download PDF' link.)]

Alternatively, there are some Contextual Menu items that could do what you want. E.g., one CM tool that I use quite a lot is Frank Reiff's shareware "A Better Finder" CM suite. This suite includes the 'A Better Finder Rename' CM item which is quite powerful; among its many features is a 'Produce numbered list' option which can process the selected files by name, creation date or modification date, in either ascending or descending order. You could also check out the many other capable CM items available via the Control-Click! web site.

[Update:- In addition, there are quite a few shareware and commercial stand-alone batch renamers. For example, see:- ChaoticSoftware's Drop*Rename utility; or, Greg Swann's Shane the Plane 2 utility; or, SkyTag Software's ever-popular File Buddy 5 utility, whose File List window has a 'Rename Sequentially...' feature.]

Regards,

--Paul

[This message has been edited by Paul Crawford (edited 04-21-2000).]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:01 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2