rename several files in bash or python
Hi,
i would like to build a bash script or a python program that list a directory structure and, for all the files that it find, removes the extension java,v to java. How i do that? Regards, Pedro |
I think i found it.
for file in *.txt; do mv $file `echo $file | sed 's/\(.*\.\)txt/\1TXT/'`; done |
But, i've another question.
If i want to run this script inside each directory, how should i do it? thanks |
All times are GMT -5. The time now is 01:06 AM. |