Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to rename all the files in a folder having specific
extension?
Example: I have some files with extension (.txt) in a folder
name 'Test'. I have to rename all the .txt files in a test
and its subdirectories to .my extension.

Answer Posted / ramit

Hi Nagesh,

Thanks for the reply but I dont think this will work
as $file= myFile.txt
and mv $file $file.my will rename to myFile.txt.my

I found the solution by extracting basedirectory and
filename then renaming it to req. extension.

thanks

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to calculate the number of passed arguments?

1093


What is a shell in operating system?

1103


What is the difference between grep and egrep?

1136


What is awk in shell script?

1228


What is shell prompt?

1019


What is the difference between scripting and coding?

1039


Can we run shell script in windows?

1135


Why is a script important?

1065


What is the use of break command?

1105


What command needs to be used to take the backup?

988


Determine the output of the following command: [ -z “” ] && echo 0 || echo 1

992


What is bourne shell scripting?

981


What are the 3 standard streams in linux?

1138


Print the 10th line without using tail and head command.

2177


determine the output of the following command: echo ${new:-variable}

980