|I am assuming you are looking for a unix script? First, I would use the dos2unix command.|
If that is not available, this link describes several ways of deleting control-M's:
Place anyone of them into a for loop. Here is an example:
for file in *.txt
tr -d '\015\032' < $file > $file.tmp
cp $file.tmp $file
# end script
If you want to do every file in the directory simply drop the .txt extension above. Once the script works the way you want, change the copy command, cp, to move, mv.