Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!sdd.hp.com!decwrl!nsc!voder!dtg.nsc.com!waggoner From: waggoner@dtg.nsc.com (Mark Waggoner) Newsgroups: comp.sys.amiga Subject: Re: Command sequence help needed... Message-ID: <417@icebox.nsc.com> Date: 8 Jun 90 17:02:34 GMT References: <2500@orbit.cts.com> <191@cbmger.UUCP> Reply-To: waggoner@icebox.UUCP (Mark Waggoner) Organization: National Semiconductor, Santa Clara Lines: 38 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.