Re: Rename files

2000-03-23 Thread Robert Kasunic
Thanks to everybody who helped. I've got all my files like I want them now. Robert

Re: Rename files

2000-03-22 Thread Colin Watson
[EMAIL PROTECTED] (Oswald Buddenhagen) wrote: >> On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote: >> > I'm trying to rename a lot of files. I just want to substitute underlines >> > with whitespaces. How can I do that? >> >> You might use mmv. >> >> If your files are: foo_bars >>

Re: Rename files

2000-03-22 Thread Anthony Campbell
On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote: > Hi! > > I'm trying to rename a lot of files. I just want to substitute underlines > with whitespaces. How can I do that? I recently found a package called mvgp which does exactly what you want. It seems to work quite well. I found

Re: Rename files

2000-03-22 Thread Oswald Buddenhagen
> On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote: > > Hi! > > > > I'm trying to rename a lot of files. I just want to substitute underlines > > with whitespaces. How can I do that? > > You might use mmv. > > If your files are: foo_bars > then use mmv "*_*" '#1\ #2' (qu

Re: Rename files

2000-03-22 Thread brian moore
On Tue, Mar 21, 2000 at 10:32:54PM +0100, Christian Surchi wrote: > On Tue, Mar 21, 2000 at 12:34:07PM -0800, brian moore wrote: > > > rename 's/_/ /g' *.mp3 > > rename? :o Hrrm? Yes. It comes with perl. -- Brian Moore | Of course vi is God's editor. Sysadmin, C/P

Re: Rename files

2000-03-22 Thread Christian Surchi
On Tue, Mar 21, 2000 at 12:34:07PM -0800, brian moore wrote: > rename 's/_/ /g' *.mp3 rename? :o -- | Christian Surchi | www.firenze.linux.it/~csurchi| www. | | [EMAIL PROTECTED] | [EMAIL PROTECTED] | gnu. | | FLUG: www.firenze.linux.it | Debian GNU/Linux: w

Re: Rename files

2000-03-21 Thread kmself
On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote: > Hi! > > I'm trying to rename a lot of files. I just want to substitute underlines > with whitespaces. How can I do that? Given that spaces can interfere with shell parsing, particularly for loops of the "for foo in $bar; do somethi

Re: Rename files

2000-03-21 Thread brian moore
On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote: > Hi! > > I'm trying to rename a lot of files. I just want to substitute underlines > with whitespaces. How can I do that? rename 's/_/ /g' *.mp3 (or whatever). -- Brian Moore | Of course vi is God's editor.

Re: Rename files

2000-03-21 Thread Robert Mognet
On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote: > Hi! > > I'm trying to rename a lot of files. I just want to substitute underlines > with whitespaces. How can I do that? You might use mmv. If your files are: foo_bars then use mmv "*_*" '#1\ #2' (quotes required) ht

Re: Rename files

2000-03-21 Thread Colin Watson
[EMAIL PROTECTED] (Oswald Buddenhagen) wrote: >> I'm trying to rename a lot of files. I just want to substitute underlines >> with whitespaces. How can I do that? >> >possibly not the easiest way, but it works: > >for i in *; do mv "$i" "${i//_/ }"; done > >works only with bash 2.x (probably y

Re: Rename files

2000-03-21 Thread Oswald Buddenhagen
> > > I'm trying to rename a lot of files. I just want to substitute underlines > > > with whitespaces. How can I do that? > > you could try mmv > for example, if files are: foo_bar > just do > mmv "foo*bar" foo\ bar (the quotes are required) > this gives you nothing: normal mv would do t

Re: Rename files

2000-03-21 Thread Robert Mognet
On Tue, Mar 21, 2000 at 04:09:59PM +0100, Oswald Buddenhagen wrote: > > I'm trying to rename a lot of files. I just want to substitute underlines > > with whitespaces. How can I do that? you could try mmv for example, if files are: foo_bar just do mmv "foo*bar" foo\ bar (the quotes are r

Re: Rename files

2000-03-21 Thread Oswald Buddenhagen
> I'm trying to rename a lot of files. I just want to substitute underlines > with whitespaces. How can I do that? > possibly not the easiest way, but it works: for i in *; do mv "$i" "${i//_/ }"; done works only with bash 2.x (probably you have one ...). you also could try mmv, but i don't

Rename files

2000-03-21 Thread Robert Kasunic
Hi! I'm trying to rename a lot of files. I just want to substitute underlines with whitespaces. How can I do that? TIA Robert [EMAIL PROTECTED] PS: Please reply to [EMAIL PROTECTED]

Re: Batch rename files

2000-01-24 Thread Matthias Hertel
e that is designed for the job. You use sed to assemble a stream of commands that you pipe into a shell: ls foo-*-bar-*.txt | sed 's/\(foo\(.*\)bar-\(.*\)\)/mv \1 blah\2\3;/' | sh or so. For increased power/obfuscation, you could pipe the output of find into sed. This enables you to renam

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 |