Jeff Hooge wrote at Fri, 07 Jun 2002 17:49:37 +0200:

> All right, first off I'm a total perl newbie (about 2 days now) and am looking for 
>some resources
> on how to do a few things. Resources, meaning, don't tell me how to write the script 
>just point me
> in the right direction of where to start. Also this may be an easy thing to do but 
>remember I'm
> still learning.

That's really the right way.

> 
> So heres what I'm trying to do, I have a few folders with about 50-100 mp3s that I 
>want to go
> threw and rename each file. Well going threw selecting them and then renaming gets 
>rather boring
> so I'm wanting to write a perl script that will do this for me. Something like:
> 
> you specify the folder name
> it opens that folder
> gets the first file
> prints how many files are left
> prints the file name
> asks for new name
> renames file
> gets next filename
> then repeats
> 

You should have a look to the File::Find module.
It searches through directories and subdirectories and 
calls for every file found a subroutine.

Then you can print the filename,
ask for a new one with something like 
chomp( $filename = <STDIN> );
renaming the file (perldoc -f rename).

What is a little bit more difficult is to print the files left.
Just go step for step.
When you are so far, you'll probably have found the solution or 
ask simply again.

(I would give a better hint - 
 but I'm not sure if you want to show the total files remaining or
 the files remaining in this folders or ... -
 however step by step is always right ;-) 

Best Wishes,
Janek


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

Reply via email to