Re: Batch rename files

2000-01-24 Thread Matthias Hertel
Arcady Genkin <[EMAIL PROTECTED]> writes: > What would be the easiest way to rename a bunch of files > > foo-[0-9]-bar-[0-9][0-9].txt > > into > > blah-[0-9]-[0-9][0-9].txt > > Note, that all of the files have identical portions `foo-', `-bar-', > and `.txt' in the filenames. Different are two

Re: Batch rename files

2000-01-24 Thread David Wright
Quoting Arcady Genkin ([EMAIL PROTECTED]): > What would be the easiest way to rename a bunch of files > > foo-[0-9]-bar-[0-9][0-9].txt > > into > > blah-[0-9]-[0-9][0-9].txt > > Note, that all of the files have identical portions `foo-', `-bar-', > and `.txt' in the filenames. Different are two

Re: Batch rename files

2000-01-24 Thread Dave Sherohman
Arcady Genkin said: > What would be the easiest way to rename a bunch of files > > foo-[0-9]-bar-[0-9][0-9].txt > > into > > blah-[0-9]-[0-9][0-9].txt mmv is the way to go. It's in the mmv package (imagine that...); just install it (if you haven't already done so) and then mmv "foo-*-bar-*" b

Re: Batch rename files

2000-01-24 Thread Oleg Krivosheev
On Sun, 23 Jan 2000, Arcady Genkin wrote: > > What would be the easiest way to rename a bunch of files > > foo-[0-9]-bar-[0-9][0-9].txt > > into > > blah-[0-9]-[0-9][0-9].txt > > Note, that all of the files have identical portions `foo-', `-bar-', > and `.txt' in the filenames. Different are

Re: Batch rename files

2000-01-24 Thread Shao Zhang
A quick solution that pops out of my head, but it is pretty stupid, and certainly not the easiest: ls -1 > rename; cat rename; group-1-member-01.txt group-1-member-02.txt group-2-member-01.txt vi rename; then do the following: :1,$s/\([a-z]*\)\(-[0-9]-\)\([a-z\-]*\)

Re: Batch rename files

2000-01-24 Thread Maciej Kalisiak
On Sun, Jan 23, 2000 at 10:54:42PM -0500, Arcady Genkin wrote: > What would be the easiest way to rename a bunch of files > > foo-[0-9]-bar-[0-9][0-9].txt > > into > > blah-[0-9]-[0-9][0-9].txt Try the attached Perl script (just put it in a directory that's in your path and make it executable).

Batch rename files

2000-01-24 Thread Arcady Genkin
What would be the easiest way to rename a bunch of files foo-[0-9]-bar-[0-9][0-9].txt into blah-[0-9]-[0-9][0-9].txt Note, that all of the files have identical portions `foo-', `-bar-', and `.txt' in the filenames. Different are two numerical parts. For example: , | group-1-member-01.txt |