Operating System - HP-UX
1833138 Members
3667 Online
110051 Solutions
New Discussion

SFTP -B batchfile not working

 
Felisa_1
New Member

SFTP -B batchfile not working

I've createD an sftp perl script that calls a batchfile.Both files are stored under a windows server.
Please let me know which piece of my code below is causing the problem. Also, we are generating a public key.

perl script - "eft-corp-ftp"

use strict;
my ($lawdir, $runcmd, $server, $prodline, $workdir);
my ($datadir, $pagecmd, $pagehdr, $stat, $cp, $FTPPATH, $SrvAdr);
###
### Send out corp EFT
###
### start of script
###

use prodline;
($lawdir, $runcmd, $server, $prodline, $workdir,
$datadir, $pagecmd, $pagehdr) = &prodname($ARGV[0]);

system(“sftp –b EftCorpFtp.bat mailslot#23192-send:@sftp.xxxx.com”);


#RETCODE=$?

#if ($RETCODE != 0)
# {$pg = system("$pagecmd law2 -m $pagehdr Error completing FTP for eft.corp.txt Return code is $RETCODE. ");
# $pg = system("$pagecmd law1 -m $pagehdr Error completing FTP for eft.corp.txt Return code is $RETCODE. ");
# die 1;
# }
#fi

batchfile - "EftCorpFtp.bat"


rem Send out corp EFT to BMO

rem start of script
rem lcd - is the location of the eft.corp2.txt rem cd - is the target destination

ECHO executing the batchfile

lcd /primus/law/apps/dev/mpidata/eft

cd DEFTxxxx-1111OSC70-A:/*BIN
put eft.corp2.txt
quit

-- your assistance is truly appreciated.
Thanks.
Felisa