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.  ]


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

Reply via email to