Why does "Tera Term" fail to SCP a directory with the error "open file error."

286 Views Asked by At

I can use TERA TERM "scpsend" command to SCP a single file, but I get an error message "open file error" when I try to SCP a whole directory.

I know the scpsend command is only used to send a single file. How can I modify it so I can SCP an entire directory as opposed to only one file?

SOURFILE = 'E:\movies' 
DESTFILE = '/home/Angel/test'
;; Send a file.
scpsend SOURFILE DESTFILE
;; Confirm a scp process.
do
  mpause 5000
  sprintf2 str 'ps -ef |grep -v grep |grep -c scp'
  sendln str
  waitln '0' '1'
loop while result != 1
;; Do next macro after finishing the file sending.
sendln 'echo SCP finish'
;; Exit this macro script.
end
0

There are 0 best solutions below