develooper Front page | perl.golf | Postings from March 2006

Re: file renamer (i'm a newbie)

Thread Previous
From:
Andrew Savige
Date:
March 24, 2006 16:53
Subject:
Re: file renamer (i'm a newbie)
Message ID:
20060325005253.52765.qmail@web36106.mail.mud.yahoo.com
--- Eric Waguespack wrote:
> Currently the file below renames files by changing spaces to underscores.
> usage:
> find | ./file_name_fixer.pl
> 
> how could it be shortened up?
> 
> I would eventually like to modify it so that it will will modify names
> so that they only contain 'a-z0-9._'

For some general solutions to renaming files, see Larry's historic
rename script:

 http://www.csit.fsu.edu/~burkardt/pl_src/rename/rename.html

Aristotle's modern facelift of that script at:

 http://www.perlmonks.org/?node_id=303814

and the Unix rename faq:

 http://www.faqs.org/faqs/unix-faq/faq/part2/section-6.html

Renaming files is also discussed in Perl Cookbook, recipe 9.9.

I think the beginners@perl.org mailing list is more appropriate
for this type of question.

HTH,
/-\



	

	
		
____________________________________________________ 
On Yahoo!7 
Messenger - Make free PC-to-PC calls to your friends overseas. 
http://au.messenger.yahoo.com 


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About