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 pass an argument to a script?

1169


Which scripting language is best for automation?

947


What is console line?

952


What is an sh file?

921


How to check if the previous command was run successfully?

1017


How do I run a shell script on a mac?

1111


Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

1489


Explain about sourcing commands?

1073


What is shell environment?

969


Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.

1139


How do I run a script on mac?

1080


What can scripts do?

1088


Explain about the exit command?

959


is this growing field and what is average package in this?

2288


What does $@ mean bash?

1147