Bash Copy-Move file problem

Hello,
I made a script to copy files from one directory to another and move file after the copy is done. When files are present in the source directory there is no problem but when no file are present I'm getting an error.
Please help !!

---------------------
#!/bin/bash

source_txt="/Users/lsimoneau/Desktop/test/pc/textes/"
destination_txt="/Users/lsimoneau/Desktop/test/destination/textes/"
archives_txt="/Users/lsimoneau/Desktop/test/z_archives_txt/"
log_txt="/Users/lsimoneau/Desktop/copietxt.log"
extenstion_txt="*.[tT][xX][tT]"

date >> $log_txt
list=`ls "$source_txt"$extenstion_txt 2> /dev/null`
old_ifs=${IFS};IFS=$' '
echo $list | echo `wc -l` "files to copy." >> $log_txt
echo $list | while read file; do
echo $file >> $log_txt
cp -f "$file" $destination_txt
mv -f "$file" $archives_txt
done
IFS=${old_ifs}
date >> $log_txt

_________
log when files are copied

Sun Dec 14 12:39:52 EST 2008
2 files to copy.
/Users/lsimoneau/Desktop/test/pc/textes/fichier01 - copie 01 09-03-47.txt
/Users/lsimoneau/Desktop/test/pc/textes/fichier01 - copie 01 09-04-59.txt
Sun Dec 14 12:39:52 EST 2008

_________
log when files are not present

Sun Dec 14 12:40:04 EST 2008
1 files to copy.

Sun Dec 14 12:40:04 EST 2008

cp: fts_open: No such file or directory
mv: rename to /Users/lsimoneau/Desktop/test/z_archives_txt/: No such file or directory

Please put code inside [CODE] tags.

That will cause the script to fail if any filenames contain spaces.

Why $' ' instead of ' '?

That is meaningless; the echo command doesn't do anything with its standard input. It should be:

printf "%s\n" "$list" | wc -l "files to copy." >> $log_txt

Your echo command will only print a single line

That did not come from the code you posted.

Try this:

source_txt="/Users/lsimoneau/Desktop/test/pc/textes/"
destination_txt="/Users/lsimoneau/Desktop/test/destination/textes/"
archives_txt="/Users/lsimoneau/Desktop/test/z_archives_txt/"
log_txt="/Users/lsimoneau/Desktop/copietxt.log"
extension_txt="*.[tT][xX][tT]"

{
  date
  set -- "$source_txt"/$extension_txt
  [ -f "$1" ] || exit 2  ## no files
  printf "Files to copy: %d\n" "$#"
  printf "%s\n" "$@"
  cp -f "$@" "$destination_txt"
  mv -f "$@" "$archives_txt"
  date
} >> "$log_txt"

It is working perfectly.
Thank you for the judicious advice.