1 2 3 4 5 6 7
if [ -f "/dir/*,*" ]; then cd /mnt/g/tmp/destination/001/; for f in /mnt/g/tmp/destination/001/*.*; do mv "$f" "Prev_001.${f##*.}" done else echo "no such file" fi