Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!uunet!cbmvax!cbmehq!cbmger!peterk From: peterk@cbmger.UUCP (Peter Kittel GERMANY) Newsgroups: comp.sys.amiga Subject: Re: Command sequence help needed... Message-ID: <191@cbmger.UUCP> Date: 7 Jun 90 16:43:40 GMT References: <2500@orbit.cts.com> Reply-To: peterk@cbmger.UUCP (Peter Kittel GERMANY) Organization: Commodore Bueromaschinen GmbH, West Germany Lines: 36 In article <2500@orbit.cts.com> koleman@pnet51.orb.mn.org (Kurt Koller) writes: >thomas@eleazar.dartmouth.edu (Thomas Summerall) 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 >>fine using an environment variable and the skip function. The problem is >>appending the current value of the environment variable to the name. The >>statement looks like this: >> >>.key animname,animnum >>setenv temp 1 >>... >>(looping stuff deleted) >>... >>rename 00 to .00.image >>... >>(increment temp and loop) >> >>I get an error because the sequence looks for a file named "animname00" >>can I use my counter as part of the file name? If not, how can this be done? >>Am I missing the obvious? > 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 commands redirected to a file, say, in RAM: disk. Use >> for redirection for all the lines following the 1st one so to append to that file. This all goes in your loop. Finally, when you exit the loop, you just execute the newly generated batch file and delete it afterwards to close gracefully. Done. Hope that will help you, Regards, Dr. Peter Kittel