Hi,
So basically, you need to change the extension of file from .txt to . CSV? What you need to do is, get the list of files from the directory on first script and call another script using source command. This second script should accept parameters and traverse through all files in that variable and run the mv command to change the extension. It's pretty simple one.
Thank you