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

What is scripting used for?

994


Write a shell script to get current date, time, user name and current working directory.

1031


How do I run a .sh file?

967


Can shell script run on windows?

979


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

916


Explore about environment variables?

983


How to open a read-only file in the shell?

1075


What is c in shell script?

1018


What is awk script?

920


How does ls command work?

972


How to pass an argument to a script?

1093


What is bourne shell scripting?

921


‎What is a shell? · ‎Types of shell · ‎what is shell scripting?

932


What does echo mean in scripting?

958


Please give me example of " at command , contrab command " how to use

2722