ymodemsend

Sends a file from the host with the YMODEM protocol. (version 4.66 or later)

ymodemsend <filename> 

Remarks

Causes Tera Term to send the file <filename> to the host with the YMODEM protocol. Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

filename = 'test.ttl'
srcfile = 'C:\Documents and Settings\yutaka\My Documents\TeraTermMacro\test.ttl'
dstfile = 'C:\usr\ttssh2\teraterm\debug\test.ttl'

ymodemsend srcfile
if result=1 then
	messagebox 'File transfer success' 'Send'
else
	messagebox 'File transfer failure' 'Send'
endif

sprintf2 var 'sb %s' filename
sendln var
ymodemrecv
if result=1 then
	messagebox 'File transfer success' 'Recv'
else
	messagebox 'File transfer failure' 'Recv'
endif

sprintf2 var 'fc /b %s %s' srcfile dstfile
exec var
if result=0 then
	messagebox 'Two files are same.' 'Compare'
else
	messagebox 'Two files are not same.' 'Compare'
endif

See also