Here is a sample filename:
00000508+GREATER VISION+SCARS & STRIPES+00.0.MP3. I noticed after I
emailed it that the number code has exactly 11 numbers (besides the 3 in
mp3), so I created a do...while loop to take out the numbers. The
expression I used looked like this //[0-9]// then the directory
/home/user/*. This seemed to have worked for the numbers. 

I noticed another problem though how do you use expressions to take away
one '.'. See in in the time between mins and seconds there is a period.
Thanks Jeff and anyone else who chooses to look at my newbie problem.
David
On Tue, 2003-08-05 at 09:37, Jeff 'japhy' Pinyan wrote:
> On Aug 5, David Smith said:
> 
> > I have a couple of problems. I have multiple files on a server that are
> >all audio files. Some are mp3, some are waves. I need to change there
> >names because of a new automation system being put in here at the
> >station. The files are curretly laid out with a series of
> >numbers+songtitle+artist+time.ext. What I simply need to do is remove
> >the numbers (except for the 3 in mp3), and change the + to _. I found a
> >script that will do this with regular expressions. Here is the problem
> >though. I run the script and it does not loop through the file to take
> >out all of the numbers unless I run it several times. It also refuses to
> >take out the +. I'm really really new to perl...in fact I know just
> >enough to be extremely dangerous :D. If anyone could point me in the
> >right direction I would appreciate.
> 
> You didn't show us how you tried running the program.  I'll show you first
> how to change the +'s to _'s.  But I need to know WHICH numbers should be
> removed from the filename.  All of them (except for the 3 in mp3), or just
> those at the beginning of the filename?
> 
>   ./rename 'tr/+/_/' files
> 
> or
> 
>   ./rename 's/\+/_/g' files
> 
> -- 
> Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
> RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
> <stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
> [  I'm looking for programming work.  If you like my work, let me know.  ]
David Smith
Programmable Solutions
[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to