@echo off

echo Transfer %1 to QNX target (192.168.168.2) ...
echo open 192.168.168.2 > putqnx.ftp
echo ftp>> putqnx.ftp
echo ftp>> putqnx.ftp
echo prompt>> putqnx.ftp
echo bin>> putqnx.ftp
echo put %1>> putqnx.ftp
echo bye>> putqnx.ftp
ftp -s:putqnx.ftp > putqnx.log
echo done
echo Start %1 on QNX target
rsh 192.168.168.2 -l root chmod 777 /home/ftp/%1
rsh 192.168.168.2 -l root /usr/photon/bin/pterm /home/ftp/%1