Change *.txt to *.csv
You need to loop over all files

for f in *.txt; do
    mv "$f" "${f%.txt}.csv"
done


If you have files with names starting with a . as well you might need to run

for f in *.txt .*.txt; do
    [[ -f "$f" ]] &amp;&amp; mv "$f" "${f%.txt}.csv"
done