[GLLUG] Changing the case in file names

Hampton, Rodney rodney.hampton at jnli.com
Thu Jun 30 08:52:02 EDT 2005


ls|perl -e 'while(<STDIN>){chomp $_;$ofn=$_;$nfn=lc($ofn);$nfn=~s/
/_/g;print "new_file_name is $nfn \n";$exec_string="mv $ofn $nfn";print
"exec_string is $exec_string \n";system($exec_string);}'

 

Something like this?    

 

-----Original Message-----
From: Seth Bembeneck [mailto:sbdataspiller at sbcglobal.net]
Sent: Thursday, June 30, 2005 12:32 AM
To: 'GGLUG'
Subject: [GLLUG] Changing the case in file names



Is there a quick way to rename several files in a directory and
subdirectories so that the file names are in lower case, and also replacing
all spaces with _'s?

 

Thanks,

 

Seth

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.egr.msu.edu/mailman-archives/linux-user/attachments/20050630/7089ac95/attachment.htm


More information about the linux-user mailing list