cp: cannot access

Hi All,
I have the following script, where I am copying a list of files from one location to another location. The permissions, owners are fine. Why i am getting cp: cannot access error when i run this script. But the cp works at command prompt...

files="home/file.lst"
for file in `cat $files`
do
cp $file $HOME/copy
done
Please help. Thanks.

files="home/file.lst"
for file in `cat $files`
do
cp $file $HOME/copy
done
Please help. Thanks.

check your files variable. The path should probably look like this files="/home/file.lst"

Nope..., it is still not working...

I should have noticed this before. Your cp command is over writing each of the previous copies! So you will end up with one file in your $HOME dir named copy. Why are you doing this? I assume its a typo. You need to change the destination file name. Also, check permissions again.

This is not the reccomended naming convention, just wanted to illustrate my point!

COUNT=0
FILES=$(cat /home/file.lst)
for file in $FILES
do
cp $file $HOME/copy_$COUNT
let COUNT +=1
done

This is not "for" problem...
I don't think when we use for loop we have to do the explicit couting again.... is is not a while loop...