[comp.sys.amiga.tech] RENAMING FILES

blech@eleazar.dartmouth.edu (Michael Blechner) (12/03/89)

I need to rename 200+ files quickly and easily, i.e. not one at a time
I have files mike.1.image through mike.200.image (sculpt animate files)
and files mike2.1.image through mike2.200.image. I want to rename all mike2
files to mike files mike.201.image through mike.400.image.  I cant seem to find
an easy way to do this?  Please help me out I have 5 different sets of 200+
files to change.  Thanx. Please Email.

                                        -Michael Blechner
                                         blech@eleazor.dartmouth.edu

martens@shawnee.cis.ohio-state.edu (Jeff Martens) (12/04/89)

In article <17628@dartvax.Dartmouth.EDU> blech@eleazar.dartmouth.edu (Michael Blechner) writes:

>I need to rename 200+ files quickly and easily....

Use list.  For an example, look on p. 2-17 of the 1.3 Enhancer pamphlet.
-=-
-- Jeff (martens@cis.ohio-state.edu)

With the 11/89 issue, the Communications of the ACM has finally become
100% devoid of computer science.

martens@canoe.cis.ohio-state.edu (Jeff Martens) (12/04/89)

In article <74647@tut.cis.ohio-state.edu> Jeff Martens <martens@cis.ohio-state.edu> writes:
>In article <17628@dartvax.Dartmouth.EDU> blech@eleazar.dartmouth.edu (Michael Blechner) writes:

>>I need to rename 200+ files quickly and easily....

>Use list.  For an example, look on p. 2-17 of the 1.3 Enhancer pamphlet.

I gave this a little more thought, and off the top of my head, I'm not
sure you can make list put out exactly what you need.  But if you
combine it with emacs, a quick macro will do the job.  Actually, emacs
(microemacs, Dave Lawrence's version, 3.6 or later) alone will do the
trick.  If you don't know how to write the macro, give me a shout and
I'll do it for you.

Note that I redirected followups.
-=-
-- Jeff (martens@cis.ohio-state.edu)

Expect a severe winter -- I saw a trailer full of snowmobiles heading
south on US 23.

mwm@violet.berkeley.edu (Mike (With friends like these, who needs hallucinations) Meyer) (12/05/89)

In article <17628@dartvax.Dartmouth.EDU> blech@eleazar.dartmouth.edu (Michael Blechner) writes:
<I need to rename 200+ files quickly and easily, i.e. not one at a time
<I have files mike.1.image through mike.200.image (sculpt animate files)
<and files mike2.1.image through mike2.200.image. I want to rename all mike2
<files to mike files mike.201.image through mike.400.image.  I cant seem to find
<an easy way to do this?  Please help me out I have 5 different sets of 200+
<files to change.  Thanx. Please Email.

The following near trivial ARexx script ought to do it if you run the
output of "list quick mike2#?" through it as standard input. The
format option to list isn't quite up to it. Parameterizing it to do
different files or different offset ought to be straightforward.

	<mike

/* */
address command		/* Only if you don't have WSHell */

do forever
	parse pull "."number"."
	if number == "" then exit
	'rename mike2.'number'.image mike.' || number+200 || '.image
	end
--
Kiss me with your mouth.				Mike Meyer
Your love is better than wine.				mwm@berkeley.edu
But wine is all I have.					ucbvax!mwm
Will your love ever be mine?				mwm@ucbjade.BITNET