Renaming the File in UNIX

I have many files in a particular folder(all ending with extension .F1.Test). I need a unix command that will change my file extension from .F1.Test to .csv

I tried giving the command as "ren sample.F1.Test sample.csv", but i got the file as "sample.F1.csv"
Example : I have the filename (sample.F1.Test and test.F1.Test), so after the unix command it should be renamed to (sample.csv and test.csv). Please let me know the unix command to convert the above file extension.

Try
mv sample.F1.Test sample.csv
mv test.F1.Test test.csv

dear prashant,
this code will move the original file but he want to rename it not to move i guess...

This gives the commands to remove those files:

ls *.F1.test | sed 's/\(.*\)\.F1\.Test/mv & \1.csv/'

If the output is correct you can pipe the output to sh.

Regards

Dear vidydhar,

thanks for reminding....

If he want to keep original file, he can use
cp sample.F1.Test sample.csv

Regards
Prashant

but what if he has lots of file ending with F1.test then cp will take a lot of time..
i mean he has to type every time.. :rolleyes:

If he has lot of files, then he can go for a script,...i guess.

moving is the same as renaming - you move the file from one name to another.

Using Cp and Mv is the only possible way in Unix for the above issue.