If you need to make a script instead of using the
dos2unix program, this example might get you started ...
Code:
#!/bin/bash
mkdir /home/tmp 2> /dev/null
cd /home/images
for i in *.txt ; do
cat "$i" | tr -d '\015' > "/home/tmp/$i"
done
mv -v /home/tmp/*.txt /home/images