Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!apple!rutgers!cunixf.cc.columbia.edu!will From: will@cunixf.cc.columbia.edu (William Chou) Newsgroups: comp.sys.amiga Subject: Re: Command sequence help needed... Summary: An Easier Way To Rename Files Message-ID: <1990Jun9.171134.6725@cunixf.cc.columbia.edu> Date: 9 Jun 90 17:11:34 GMT References: <2500@orbit.cts.com> <191@cbmger.UUCP> <417@icebox.nsc.com> Reply-To: will@cunixf.cc.columbia.edu (William Chou) Organization: Columbia University Lines: 57 In article <417@icebox.nsc.com> waggoner@icebox.UUCP (Mark Waggoner) writes: >Not sure about the quoting here, but it's non-controversial: > >In article <191@cbmger.UUCP> peterk@cbmger.UUCP (Peter Kittel GERMANY) writes: >>In article <2500@orbit.cts.com> koleman@pnet51.orb.mn.org (Kurt Koller) writes: >>>Hi, I'm trying to write a command sequence that will rename single frames saved >>>from a deluxepaint animation so they can be loaded and compressed by SA4D. >>>Dpaint saves each frame as framename001 framename002, etc... SA4D needs >>>framename.001.image framename.002.image, etc... >>> >>>So, I want to make a command "chanim" that will take as arguments the name >>>of the anim and the number of frames, and convert the names. The looping works > >conventional "execute" script deleted > >>There is no other way, you must build an own batch file that will contain >>all those rename statements. You may do this via excessive use of echo >... >>Hope that will help you, >>Regards, Dr. Peter Kittel > >Since you are using a conventional execute script, I assume you don't >have ARexx. If you did, however, this would be fairly easy.... >The following code has not been tested in any way and is not the most >generic implementation, but you can get the idea. > >/* Rename DP files for SA */ >parse arg basename count >do i = 1 to count > 'RENAME' basename || i || ' TO ' || basename || '.' || count || '.image' >end >exit > > > >-- >Mark Waggoner Santa Clara, CA (408) 721-6306 waggoner@dtg.nsc.com > Unofficially representing National Semiconductor Local Area Networks Group > Officially misrepresenting myself. An easier way to rename multiple files is to use ARP's move command. Just Move framename* framename.*.image The wildcard can be used as a variable to hold a string, kindof. Something that I wish the UNIX version had! (Just say no to shell scripts! :-) =============================================================================== // "Only Amigas Be Excellent to Yourself, And most of all... \\ // Make It And Be Excellent to Eachother. Be Excellent to Your Amiga! \X/ Possible" - Bill & Ted will@cunixf.columbia.edu =============================================================================== =============================================================================== // "Only Amigas Be Excellent to Yourself, And most of all... \\ // Make It And Be Excellent to Eachother. Be Excellent to Your Amiga! \X/ Possible" - Bill & Ted will@cunixf.columbia.edu