Go Back   Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum > Web Hosting and Domains > Shared & Reseller Hosting

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-25-2008, 06:00 AM
Junior Member
 
Join Date: Oct 2008
Posts: 10
Default Change file extension from higher case to lower case

Changing file extension from higher case to lower case with a perl script

If any file is called many times and you want to change its extension from higher case to lower case, it will be time consuming if you edit every file which is having reference to that file.

You can use following script to change the .JEPG extension for a file to the .jpeg wherever the file has been called.

The script you can run is as given below will change example.JPEG to example.jpeg in every file, wherever it has been called.
================================================
perl -pi -e "s|(example.)JPEG|\$1jpeg|g" *
================================================

You can use dots as a repeater in above script, if you have more that one file to be change the extension for.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:35 PM.
Copyright 2002-2007 WebHosting.uk.com. All rights reserved.
Web Hosting UK Forum