scp not working in expect script

Hi All,
I run the scp command in shell prompt without issue, but when on expect script as below:

#!/usr/bin/expect
spawn scp /var/spool/sms/failed.tar.gz abc@10.10.12.2:/home/abc
expect "abc@10.10.12.2's password: "
send "abcfef\r"
exit 0
   It looks not working at all and the tar file never transfer from local machine to remote machine.
    Anyone have any idea?

Add the full path of the scp in the script.

[root@client ~] which scp
/usr/bin/scp

Print the error you have got to investigate more on it.

Hi
When I run debug mode i get below error:

root@debian:~# expect -d copyfiles 
expect version 5.45
argv[0] = expect  argv[1] = -d  argv[2] = copyfiles  
set argc 0
set argv0 "copyfiles"
set argv ""
executing commands from command file copyfiles
spawn /usr/bin/scp /var/spool/sms/failed.tar.gz abc@10.10.12.2:/home/abc
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {13593}

expect: does "" (spawn_id exp6) match glob pattern "elaine@10.10.12.2's password: "? no
elaine@10.10.12.2's password: 
expect: does "abc@10.10.12.2's password: " (spawn_id exp6) match glob pattern "abc@10.10.12.2's password: "? yes
expect: set expect_out(0,string) "abc@10.10.12.2's password: "
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "abc@10.10.12.2's password: "
send: sending "pass.word\r" to { exp6 }

Any idea how to resolve it?

Stupid question, but could you ditch expect and use scp in batch mode? It may require setting up an SSH key pair, but assuming you are allowed to do such a thing it would make your life an awful lot easier.

Andrew